有时候运行android程序时会提示:No compatible targets were found Do you wish to a add new Android Virtual Device!
这时可手工建立一个AVD。
首先看看有哪些可用的target:
[root@seuzw seuzw]# android list targets
Available Android targets:
id: 1 or "android-5"
Name: Android 2.0
Type: Platform
API level: 5
Revision: 1
Skins: HVGA (default), WQVGA432, WQVGA400, WVGA854, QVGA, WVGA800
id: 2 or "Google Inc.:Google APIs:5"
Name: Google APIs
Type: Add-On
Vendor: Google Inc.
Revision: 1
Description: Android + Google APIs
Based on Android 2.0 (API level 5)
Libraries:
* com.google.android.maps (maps.jar)
API for Google Maps
Skins: WVGA854, WQVGA400, HVGA (default), WQVGA432, WVGA800, QVGA
然后输入如下命令新建一个AVD:
[root@seuzw seuzw]# android create avd --name aid20r1 --target 1
中间按提示输入相应的配置信息即可:
Android 2.0 is a basic Android platform.
Do you wish to create a custom hardware profile [no]yes
SD Card support: Whether the device supports insertion/removal of virtual SD Cards.
hw.sdCard [yes]:yes
Abstracted LCD density: Must be one of 120, 160 or 240. A value used to roughly describe the density of the LCD screen for automatic resource/asset selection.
hw.lcd.density [160]:240
DPad support: Whether the device has DPad keys
hw.dPad [yes]:yes
Accelerometer: Whether there is an accelerometer in the device.
hw.accelerometer [yes]:yes
Maximum horizontal camera pixels
hw.camera.maxHorizontalPixels [640]:640
Cache partition size
disk.cachePartition.size [66MB]:66MB
Audio playback support: Whether the device can play audio
hw.audioOutput [yes]:yes
Track-ball support: Whether there is a trackball on the device.
hw.trackBall [yes]:yes
Maximum vertical camera pixels
hw.camera.maxVerticalPixels [480]:480
Data partition size
disk.dataPartition.size [66MB]:66MB
Camera support: Whether the device has a camera.
hw.camera [no]:no
Battery support: Whether the device can run on a battery.
hw.battery [yes]:yes
Touch-screen support: Whether there is a touch screen or not on the device.
hw.touchScreen [yes]:yes
Audio recording support: Whether the device can record audio
hw.audioInput [yes]:yes
GPS support: Whether there is a GPS in the device.
hw.gps [yes]:yes
System partition size
disk.systemPartition.size [72MB]:72MB
Cache partition support: Whether we use a /cache partition on the device.
disk.cachePartition [yes]:yes
Keyboard support: Whether the device has a QWERTY keyboard.
hw.keyboard [yes]:ye
ye is not a valid reply
Keyboard support: Whether the device has a QWERTY keyboard.
hw.keyboard [yes]:yes
Max VM application heap size: The maximum heap size a Dalvik application might allocate before being killed by the system. Value is in megabytes.
vm.heapSize [16]:16
Device ram size: The amount of physical RAM on the device, in megabytes.
hw.ramSize [96]:96
GSM modem support: Whether there is a GSM modem in the device.
hw.gsmModem [yes]:yes
如果看到以下信息,便建立成功了:
Created AVD 'aid20r1' based on Android 2.0, with the following hardware config:
hw.sdCard=yes
hw.accelerometer=yes
hw.dPad=yes
hw.lcd.density=240
hw.camera.maxHorizontalPixels=640
disk.cachePartition.size=66MB
hw.trackBall=yes
hw.audioOutput=yes
hw.camera.maxVerticalPixels=480
hw.battery=yes
hw.camera=no
disk.dataPartition.size=66MB
hw.touchScreen=yes
hw.audioInput=yes
hw.gps=yes
disk.systemPartition.size=72MB
disk.cachePartition=yes
hw.keyboard=yes
vm.heapSize=16
hw.ramSize=96
hw.gsmModem=yes
阅读(9316) | 评论(0) | 转发(0) |