Книга: Beginning Android

Getting Started, Virtually

Getting Started, Virtually

Android 1.5 introduced the Android Virtual Device (AVD) system. This allows you to have multiple Android emulator images available, targeting different device profiles. Each image can vary in terms of Android API version (e.g., 1.1 versus 1.5), available add-ons (e.g., whether or not Google Maps are included), and hardware capabilities (e.g., does it have a touch screen?).

To create an AVD, you must first choose a “target”. Targets represent a combination of an API version and a set of available add-ons. You can find out the available targets for your environment by executing the following command:

android list targets

For example, at the time of this writing, three targets are available:

• 1, indicating the Android 1.1 SDK with no add-ons

• 2, indicating the Android 1.5 SDK with no add-ons

• 3, indicating the Android 1.5 SDK with the Google Maps add-on

Then, once you have a target in mind, to create the AVD itself, execute the following command:

android create avd -n ... -t ...

The first ellipsis indicates where you specify your own name for this AVD; the second ellipsis is where you fill in the target you wish from the available targets in your environment.

If you choose a target that represents a “standard system image” (i.e., no add-ons), you will be prompted to optionally configure the hardware profile. If you go through that process, you will be able to determine how much RAM is in your emulated device, whether or not it has a touchscreen, etc.

Оглавление книги

Оглавление статьи/книги

Генерация: 0.049. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз