Running on the Emulator

To run an Android application, you need a device – either a hardware device or a virtual device. Virtual devices are powered by the Android emulator, which ships with the developer tools.

To create an Android virtual device (AVD), choose WindowAndroid Virtual Device Manager. When the AVD Manager appears, click the New... button on the righthand side of the window.

In the dialog that appears, you are offered many options for configuring a virtual device. For your first AVD, choose to emulate a Galaxy Nexus device running Google APIs – API Level 17, as shown in Figure 1.13. If you are running on Windows, you will need to change the RAM from 1024 to 512 to get the AVD to behave properly. Then click OK.

Figure 1.13  Creating ...

Get Android Programming: The Big Nerd Ranch Guide 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.