Chapter1 In the Android Studio welcome screen,navigate to Configure Project Defaults Project Structure.In SDK Location,you should have a selected Android SDK location,as shown in the next screenshot.This selected SDK location is the default location that will be used in our Android projects.However,we can change it later for specific projects that require special settings. SDK Location SDK Location Android SDK location: The directory where the Android SDK is located.This location will be used for new projects,and for existing projects that do not have a local.properties file with a sdkdir property. C:\Program Files (x86)\Android\android-studio\sdk JDK location: The directory where the Java Development Kit (DK)is located. C:\Program FilesVava\jdk1.7.0 OK Cancel Apply 6somitmyewAadodSDkoamigmdnAadoidSaiathaouaeo I91
Chapter 1 [ 9 ] In the Android Studio welcome screen, navigate to Configure | Project Defaults | Project Structure. In SDK Location, you should have a selected Android SDK location, as shown in the next screenshot. This selected SDK location is the default location that will be used in our Android projects. However, we can change it later for specific projects that require special settings. If you don't have any Android SDK configured in Android Studio, then you have to add it manually
Installing and Configuring Android Studio To accomplish this task,click on the ellipsis button to add an Android SDK,and then select the home directory for the SDK.Check whether you have it in your system the Andro Studi tion directory.You sho der na and the fo 备合口X5列 Hide path .tanium doproject 白locd 田▣AdbG 日Android 日an id-studo -口plugins 由口system Dreg and drop a fle into the space above to quickly locate t in the tre oK☐Cancel Help another Android SDK location that is different from the location ncluded with A used the Android Deve ment Tools(ADT)plugin for Eclipse,you already have an Android SDK installed in your system. 101
Installing and Configuring Android Studio [ 10 ] To accomplish this task, click on the ellipsis button to add an Android SDK, and then select the home directory for the SDK. Check whether you have it in your system by navigating to your Android Studio installation directory. You should find a folder named sdk. It contains the Android SDK and its tools. The Android Studio installation directory might be in a hidden folder, so click on the button highlighted in the following screenshot to show hidden files and directories: If you wish to use another Android SDK location that is different from the location included with Android Studio, select this instead. For example, if you previously used the Android Development Tools (ADT) plugin for Eclipse, you already have an Android SDK installed in your system
Chapter 1 Summary WeasSnstd and installed o e k vailahle on the welcom screen.Also,you learned how to config SDK and install it manually in case you wish to use a different version.Completing these tasks will leave our system with Android Studio running and configured to create our first project. In the next chapter,we will learn about the concept of a project and how it includes everything the application requires,from classes to libraries.We will also create our first project and discuss the different kinds of activities available in the wizard. 【11
Chapter 1 [ 11 ] Summary We successfully prepared the system for Android Studio and installed our Android Studio instance. We ran the Studio for the first time, and now we know the options available on the welcome screen. Also, you learned how to configure your Android SDK and install it manually in case you wish to use a different version. Completing these tasks will leave our system with Android Studio running and configured to create our first project. In the next chapter, we will learn about the concept of a project and how it includes everything the application requires, from classes to libraries. We will also create our first project and discuss the different kinds of activities available in the wizard
2 Starting a Project nd the activity.How can you achieve this using Android Studio? het能coemdwaYeheaoiwHoeaehe r.we will discuss how to create a new ject with the basic content project and go through the project configuration fields.We will select one of the different kinds of activities available in the wizard as our main activity. These are the topics we'll be covering in this chapter: Creating a new project Selecting the parameters Choosing your main activity from different types of activities
Starting a Project Now that you have installed Android Studio, the next thing to do is to get familiar with its features. You need to understand the necessary fields and form factors when creating a project. Also, you may need to choose the activity type to create the main activity. How can you achieve this using Android Studio? In this chapter, we will discuss how to create a new project with the basic content that is needed to start out. We will use the Android Studio wizard to create the project and go through the project configuration fields. We will select one of the different kinds of activities available in the wizard as our main activity. These are the topics we'll be covering in this chapter: • Creating a new project • Selecting the parameters • Choosing your main activity from different types of activities
Starting a Prject Creating a new project aegewoaea following screenshot: New Project Android Studio Configure your new project Application name:My Application Company Domain:belen.example.com Package name: com.example.belen.myapplication Edit Project location: C:\Users\belen\AndroidStudioProjects\MyApplication Previous Not Cancel Finish Configuring the project The fields that will be shown in the New Project wizard are as follows: This the nae ho in Cooge Pay and the name -【14]
Starting a Project [ 14 ] Creating a new project To create a new project, click on the Start a new Android Studio project option from the welcome screen. If you are not in the welcome screen, then navigate to File | New Project. This opens the New Project wizard, as shown in the following screenshot: Configuring the project The fields that will be shown in the New Project wizard are as follows: • Application name: This is the name shown in Google Play and the name that users see. • Company Domain: This is the company or domain name that is used to create the package name of your application