Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

Android Studio for beginners, Part 1: Installation and setup

Jeff Friesen | Aug. 24, 2016
Install Android Studio and start your first Android project

Figure 13. Intel-based hardware acceleration is unavailable

Your options are to either put up with the slow emulator or use an Android device to speed up development. I'll discuss the latter option later in the tutorial.

Finally, click Finish to complete the wizard. You should see the Welcome to Android Studio dialog box:

Create a new Android Studio project, work with an existing Android Studio project, and more.

Figure 14. Welcome to Android Studio 

You'll use this dialog to start up a new Android Studio project, work with an existing project, and more. You can access it anytime by double-clicking the Android Studio shortcut on your desktop.

Your first Android Studio mobile app

The quickest way to get to know Android Studio is to use it to develop an app. We'll start with a variation on the "Hello, World" application: a little mobile app that displays a "Welcome to Android" message.

In the steps that follow, you'll start a new Android Studio project and get to know the project workspace, including the project editor that you'll use to code the app in Part 2.

Starting a new project

From our setup so far, you should still have Android Studio running with the Welcome to Android Studio dialog box. From here, click Start a new Android Studio project. Android Studio will respond with the Create New Project dialog box shown in Figure 15.

Choose an application name, company domain name, and (if necessary) project location.

Figure 15. Create a new project 

Enter W2A (Welcome to Android) as the application name and as the company domain name. You should then see C:\Users\jeffrey\AndroidStudioProjects\W2A as the project location. Click Next to select your target devices.

androidstudiop1 fig16

Figure 16. Select your target device categories 

Android Studio lets you select form factors, or categories of target devices, for every app you create. I would have preferred to keep the default API 15: Android 4.0.3 (IceCreamSandwich) minimum SDK setting (under Phone and Tablet), which is supported by my Amazon Kindle Fire HD tablet. Because Android Studio doesn't currently support this API level (even when you add the 4.0.3 system image via the SDK Manager), I changed this setting to API 14: Android 4.0 (IceCreamSandwich), which is also supported by my tablet.

Click Next, and you will be given the opportunity to choose a template for your app's main activity. For now we'll stick with Empty Activity. Select this template and click Next.

androidstudiop1 fig17

Figure 17. Specify an activity template

Next you'll customize the activity:

Choose the activity name and, if a layout file is to be generated, the name of the layout.


Previous Page  1  2  3  4  5  Next Page 

Sign up for CIO Asia eNewsletters.