page.title=Running Your App parent.title=Building Your First App parent.link=index.html trainingnavtop=true page.tags=emulator helpoutsWidget=true @jd:body
In the previous lesson, you created an Android project. The project contains a default app that displays "Hello World". In this lesson, you will run the app on a device or emulator.
Set up your device as follows:
Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
Run the app from Android Studio as follows:
Android Studio installs the app on your connected device and starts it.
Before you run your app on an emulator, you need to create an Android Virtual Device (AVD) definition. An AVD definition defines the characteristics of an Android phone, tablet, Android Wear, or Android TV device that you want to simulate in the Android Emulator.
Create an AVD Definition as follows:
For more information about using AVDs, see Create and Manage Virtual Devices.
Run the app from Android Studio as follows:
It can take a few minutes for the emulator to start. You may have to unlock the screen. When you do, My First App appears on the emulator screen.
That's how you build and run your Android app on the emulator! To start developing, continue to the next lesson.