Running the Hello Android App

Understanding the basics of how to get an Android application up and running is a simple yet detailed process. You’re now ready to see your hard work in action. You’ve created a launch configuration and Android Virtual Device; now it’s time to get the application running. Finally!

Running the app in the emulator

Running the application is simple. Upon your instruction, the ADT launches an emulator with the default launch configuration you build earlier in this chapter. Starting your application is as simple as choosing Run⇒Run or pressing Ctrl+F11. Either action launches the application in an emulator using the default launch configuration — in this case, ExampleConfiguration. The ADT compiles your application and then deploys it to the emulator.

If you didn’t create a launch configuration, you see the Run As dialog box, shown in Figure 3-13. Choose Android Application, and a launch configuration is created for you.

Figure 3-13: The Run As dialog box appears when a launch configuration isn’t set up.

9781118417454-fg0313.eps

If you created the ExampleConfiguration, you see the emulator loading, as shown in Figure 3-14.

Figure 3-14: The initial emulator in a loading state, with the port number the emulator is running under and the AVD name on the window’s title bar.

Help! If your emulator never loads and stays stuck on the ANDROID screen(s), there’s no need to worry, ...

Get Android Application Development For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.