Click the Finish button.

65

Chapter 3: Your First Android Project

Setting Up an Emulator Aw, shucks I bet you thought you were about to fire up this bad boy. Well, you’re almost there. You have one final thing to cover, and then you get to see all of your setup work come to life in your Hello Android application. To see this application in a running state, you need to know how to set up an emulator through the various different launch configurations. First, you need to create an Android Virtual Device AVD, also known as an emulator. An AVD is a virtual Android device that looks, acts, walks, and talks well, maybe not walks and talks just like a real Android device. AVDs can be configured to run any particular version of Android as long as the SDK for that version is downloaded and installed. It’s time to get reacquainted with your old buddy the Android SDK and AVD Manager. Follow these steps to create your first AVD: 1. To open the Android SDK and AVD Manager, click the icon on the Eclipse toolbar shown in Figure 3-9. When the Android SDK and AVD Manager is open, you should see a dialog box similar to Figure 3-10. Figure 3-9: The Android SDK and AVD Manager icon on the Eclipse toolbar. The SDKAVD Manager Figure 3-10: The Android SDK and AVD Manager dialog box. 66 Part II: Building and Publishing Your First Android Application

2. Click the New button.

The Create New Android Virtual Device AVD dialog box opens, as shown in Figure 3-11. Figure 3-11: The Create New Android Virtual Device AVD dialog box.

3. For this AVD, in the Name field, type 2_2_Default_HVGA.

For more information on naming your AVDs, see the nearby sidebar “AVD nomenclature.” 4. In the Target box, select Android 2.2 — API Level 8. 5. In the SD Card section, leave the fields blank. You have no use for an SD Card in your application. You would use the SD Card option if you needed to save data to the SD Card. If you want to have an emulator in the future, insert the size of the SD Card in mega- bytes MB that you would like to have created for you. At that time, an emulated SD Card will be created and dropped in your local file system. 6. Leave the Skin option set to Default HVGA. 7. Don’t select any new features in the Hardware section. The Hardware section outlines the hardware features your AVD should emulate. You don’t need any extra hardware configuration for your first application. 67

Chapter 3: Your First Android Project