Android Virtual Devices

Android Virtual Devices (AVDs) are configurations of emulator options that let you better model an actual device. Each AVD is made up of:

• A hardware profile. You can set options to define the hardware features of the virtual device. For example, you can define whether the device has a camera, whether it uses a physical QWERTY keyboard or a dialing pad, how much memory it has, and so on.

• A mapping to a system image. You can define what version of the Android platform will run on the virtual device. You can choose a version of the standard Android platform or the system image packaged with an SDK add-on.

• Other options. You can specify the emulator skin you want to use with the AVD, which lets you control the screen dimensions, appearance, and so on. You can also specify the emulated SD card to use with the AVD.

• A dedicated storage area on your development machine, in which is stored the device's user data (installed applications, settings, and so on) and emulated SD card.

You can create as many AVDs as you need, based on the types of devices you want to model and the Android platforms and external libraries you want to run your application on.

In addition to the options in an AVD configuration, you can also specify emulator command-line options at launch or by using the emulator console to change behaviors or characteristics at run time. For a complete reference of emulator options, please see the Emulator documentation.

To create and manage AVDs, you use the android tool provided in the Android SDK. For more information about how to work with AVDs from inside your development environment, see Developing in Eclipse with ADT or Developing in Other IDEs, as appropriate for your environment.

To create an AVD, you use the android tool, a command-line utility available in the <sdk>/tools/ directory. Managing AVDs is one of The Android SDK does not include any

To create each AVD, you issue the command android create avd, with options that specify a name for the new AVD and the system image you want to run on the emulator when the AVD is invoked. You can specify other options on the command line also, such as to create an emulated SD card for the new AVD, set the emulator skin to use, or set a custom location for the AVD's files.

Here's the command-line usage for creating an AVD:

android create avd -n <name> -t <targetID> [-<option> <value>] ...

You can use any name you want for the AVD, but since you are likely to be creating multiple AVDs, you should choose a name that lets you recognize the general characteristics offered by the AVD.

0 0

Post a comment