Simple Android App using Android Studio

Posted By on March 21, 2016


Download PDF
Installing and Using Android Studio
Parts of an Android application

In this exercise you create an Android project and start it on an Android virtual device via Android Studio.

2. Create a new Android project

Press the Start a new Android Studio project link to get started. Alternatively you can select the FileNew Project… entry from the menu.

Use the following data of input for your project. Project location and package name are derived from your input. If you want another package name, press the small Edit hyperlink.

Table 2. Setting for your Android project

Property Value
Application name Test App
Company Domain android.vogella.com
Package Name com.vogella.android.testapp
API (Minimum, Target, Compile with) Latest
Template Empty Activity

 

Creating a new Android Studio project
Creating a new Android Studio project
Creating a new Android Studio project

Android Studio automatically downloads the required Android SDK, if that has not already been done. So depending on your installation, the next dialog might not be displayed.

Creating a new Android Studio project

Afterwards select the Empty Activity template.

Creating a new Android Studio project

On the last page, accept the defaults.

Creating a new Android Studio project

3. Review the generated project

The above wizard generates based on your input an Android project. Review the generated project structure and files.

Creating a new Android Studio project

4. Create a virtual device (AVD)

Define a new Android Virtual Device (AVD) by opening the AVD Manager via ToolsAndroidAVD Manager. Afterwards press the Create Virtual Device… button.

Create a new AVD

Select values similar to the following screenshots.

Settings for a new AVD

On the next screen select the latest API level for your AVD. You may need to select the option for additional images as highlighted in the following screenshot.

Settings for a new AVD
Settings for a new AVD

Afterwards press the Finish button. This will create the AVD configuration and display it under the list of available virtual devices.

5. Start your virtual device

Select your new entry and press the Play button.

Settings for a new AVD

6. Start the application on your virtual device

Select RunRun ‘app’ to start your application. This opens a dialog in which you can select your device to deploy your application to.

Settings for a new AVD

After a while your application should start on the virtual device.

Settings for a new AVD
Installing and Using Android Studio
Parts of an Android application

Download PDF

Posted by Akash Kurup

Founder and C.E.O, World4Engineers Educationist and Entrepreneur by passion. Orator and blogger by hobby

Website: http://world4engineers.com