I don't know. You still remember our BKJIA article about Android Virtual Devices. Users who know about Android should know that virtual devices are AVD in short. Here, you will learn about how to select the Android target type of one of the plug-ins.
AVD (Android Virtual Device) is introduced in Android 1.5 ). Before running your application on the simulator, you must first create an AVD (so it can be understood that AVD is a configured simulator ).
To create an AVD, run the: Android create AVD command. Let's take a look at its usage:
- Usage:
- Android [ global options] action [ action options]
- Global options:
- - h - - help This help.
- - s - - silent Silent mode: only errors are printed out.
- - v - - verbose Verbose mode: errors, warnings
and informational messages are pr
- inted.
- Action "create AVD" :
- Creates a new Android Virtual Device.
- Options:
- - t - - target Target id of the new AVD [ required]
- - c - - sdcard Path to a shared SD card image, or size
of a new sdcard for the
- new AVD
- - p - - path Location path of the directory where
the new AVD will be created
- - n - - name Name of the new AVD [ required]
- - f - - force Force creation ( override an existing AVD)
- - s - - skin Skin of the new AVD
From the help, you can see that to create a new AVD, you must specify two places, one is-n, that is, name. This is very simple, give your AVD a popular name. The other is-t, that is, target. Currently, SDK1.5 has two types of target: platform and Add-on. Platform is the target of Android Platform, and add-on is the target of Android plug-in.
We can first run the following command to check which Android target types are provided by Android:
- $ Android list targets
- Available Android targets:
- id: 1
- Name: Android 1. 1
- Type: Platform
- API level: 2
- Skins: HVGA ( default ) , HVGA- L, HVGA- P, QVGA- L, QVGA- P
- id: 2
- Name: Android 1. 5
- Type: Platform
- API level: 3
- Skins: HVGA ( default ) , HVGA- L, HVGA- P, QVGA- L, QVGA- P
- id: 3
- Name: Google APIs
- Type: Add- On
- Vendor: Google Inc.
- Description: Android + Google APIs
- Based on Android 1. 5 ( API level 3)
- Libraries:
- * com. google. Android. maps ( maps. jar)
- API for Google Maps
- Skins: HVGA ( default ) , HVGA- L, QVGA- P, HVGA- P, QVGA- L
These are built-in in Android 1.5. If you use some of your own add-on, it will be displayed here. We will introduce how to use your add-on in the future.
After talking about this, you should have a certain understanding of the AVD Android target type. Back to the original question, how do I select the Android target type when creating an AVD? Here are some notes:
End with an example. For example, I want to create a basic Android 1.5 simulator AVD:
- $ Android create AVD - t 2 –n my1p5AVD
If you want to view all your current avds and execute Android list AVD, you will see all the AVD details.