التخطي إلى المحتوى الرئيسي

Making Your First App : Hello World

Making Your First App : Hello World
1. Welcome to Android Studio Screen
First, open Android Studio. You should see this window. Go ahead and click Start a new Android Studio Project. An Android Studio Project typically means the code and files for one Android Application.

Start a new Android Studio Project

2. New Project Screen
Here we see a few options we get to choose.

App Name Application Name is the name of the application we'll see in the App Bar at the top of our app, as well as shown in the All Apps screen on the device. Using the default is fine (examples were made with a happy birthday app, but for our purposes the naming doesn't matter).

Company Domain

Next is company domain. Since we're practicing together right now, use the domain android.example.com, which should be what is automatically shown. If you look below, you'll see that it generates the package name com.example.android.myapplication, which is combination of the reverse of the domain and your app name.

3. Target Android Devices
Next you will see this screen:

Minimum SDK Only select Phone and Tablet since we're not making an app for TV or Wear. For Minimum SDK choose the deliciously named API 15: Android 4.0.3 (IceCreamSandwich). If you're wondering about SDK naming, check out the wikipedia article on Android Version History

4. Add an activity to Mobile
Here we are given a bunch of starting applications we can choose from, depending on what we're trying to make. Go ahead and choose Blank Activity. It's the simplest one that still gives you some default files to start with.

Create New Project

5. Choose option for your new file
Finally we have some names for different files that make up our app. As you'll soon see, an application is defined in picture files, sound files, xml files, java files and more; there are a lot of files that work together to make your application.

We'll talk about this all in the future. For now, take a look at the layout name. You've been working on XML layout files, so this is the name of the file we'll be editing, remember it.

Use the defaults which should be:

Activity Name: MainActivity
Layout Name: activity_main
Title: MainActivity
Menu Resource Name: menu_main
Choose options for your new file Depending on your computer speed it might take a minute to set up your project. Go ahead and get some tea or do a stretch.

Running into Errors?
Don't panic! Lots of students have had issues with downloading Android Studio so you are not alone. To help you can try:

Checking out this Troubleshooting Document.
Asking for help in the forums and on chat. We'll be checking in once in a while to see what problems students are finding and update the first document accordingly. So if you solve a problem, consider posting about your experience. When you're talking about an error, it helps to copy the text of the error. You can also take a screenshot of the error with the CTRL-CMD-Shift on a mac, or the screenshot key on a windows.
Copy your exact error and google it. 9 times out of 10, someone has run into the same problem and posted a solution about it. You can try adding "Android Studio" to the search if just searching for the error doesn't get Android Studio specific help.

تعليقات

المشاركات الشائعة من هذه المدونة

معلومات عن gradle

فكرة عامة عن جرادل: عندما تقوم ببناء مشروع جديد فإنه من المحتمل أن تقوم بتضمينه مكتبات jar خارجية مساعدة كحال معظم المشاريع المكتوبة بلغة جافا، ولنفترض أنك تريد نقل مشروعك...

أهميه البرمجه في حياتنا

“البرمجة هي ان تعلم اغبى صديق لديك طريقة كي يحل بها مسألة ما”   مصطلحاً عاماً لغة البرمجة  هي بالأساس طريقة تسهل للمبرمج كتابة برنامجه في هيئة تعليمات وأوامر يفهمها الحاسوب بغرض تنفيذ العمل المطلوب  مصطلحاً منطقيا ما يجعل كتابة أو صناعة التطبيقات والبرامج أمرا مثيرا للاهتمام هو أنه مع وجود الانترنت أصبح كل شيء ممكنا. فعالم الانترنت هو عالم مفتوح حر تستطيع التواصل مع مختلف الناس من كل مكان. هذا العالم الذي لا يفرق كونك كبيرا او صغير , غنيا او فقير أوحتى من أي دولة أتيت. فكل ما يهم هو كيف تثبت نفسك أمام العالم. وهل تستطيع بأن تحل مشكلة شريحة معينة من الناس أو أن تجذبهم بأفكارك وطموحاتك. فهناك الكثيرون ممن بدئوا بحل أو تسهيل عمليات معينة بين بيئة صغيرة حتى ما ان لبثت وتحولت الفكرة على المستوى العالمي , وتحويل هذه الفكرة الى مشروع استثماري يدر على صاحبه بالدخل والفائدة. في إحدى محاضرات «تيدكس»، قال كريستين جينكو، إنّه على كل شخص ناجح حول العالم محاولة تعلم البرمجة االوقت والجهد كتابة كود معين تتطلب الكثير من الوقت والإتقان حتى تخرج النتيجة بالشكل الذي تريد، لكن...

أهميه لغه البايثون Python

ما هي أهميه لغه البايثون أو لماذا علي أن أبرمج بها ؟ سؤال كثير من الناس تسأله لأنفسها ومبرمجين لغات ثانيه سيسألوك لماذا ؟ لغه مشهوره سنه 2003 شركه TIOBE صنفت لغه البايثون علي أنها ...