Create an Android Virtual Device
This step is required in creating an Android phone emulator/Android Virtual Device (AVD) on which applications can be run and tested. Note that it takes some time for an AVD to start up. The good news is that separate AVDs are not needed for each application to be deployed and tested. Once the AVD is launched, any number applications can be deployed while it is still running, and it can even be used to debug applications. To create an AVD:
- In Eclipse, choose Window > Android SDK and AVD Manager.
- Select Virtual Devices in the left panel.
- Click New. The Create New AVD dialog appears.
- Type the name of the AVD, such as "myPhone."
- Choose a target. The target is the platform (that is, the version of the Android SDK, such as 2.1) to be run on the emulator. You will also get an option to choose the Google APIs, but that is unnecessary unless we want to have some Google API in the app specifically. The rest of the fields can be ignored for now.
- Click Create AVD.
Once the AVD is launched, you can see how it gives the complete look and feel of a real Android-based mobile phone, complete with keyboard and multi-touch support. It can also be used in a variety of configurations to test your app, such as landscape/portrait mode, network strength, and roaming network, etc. All of these options can be configured using the AVD manager. The AVD is self-sufficient to emulate different devices available. You can create different AVDs for different configurations and test your application on each of them to make sure it is compatible across device types.