android 1.5 SDK 模拟器无法启动问题 “Failed to find an AVD mpatible with target”错误

    更新了android 1.5 sdk后,首先会遇到一个棘手问题,模拟器启动不了,控制台报“Failed to find an AVD compatible with target”错误。解决办法如下:

 

进入1.5 sdk目录下,->tools->敲入命令“./android create avd -n my_android1.5 -t 2
”,注意,win系统,无需前边得./  ,会创建出“my_android1.5” avd文件,然后到ide环境下,run一个项目,系统提示选择一个avd ,选择你刚刚创建得“my_android1.5”,即可。以下是操作截图

 

 

这里创建了三个avd,分别对应1.5 1.1 googleApi

android book

 

 

 

android book

 

 

一个很酷得功能在创建avd文件得第二步,控制台提示“是否自定义自己得设备”,默认选项是"no",如果输入 "y",接下来可以一步步根据提示,定制自己得模拟器性能参数。比较有意思,参数表如下:

 

 

CharacteristicDescriptionProperty
Device ram sizeThe amount of physical RAM on the device, in megabytes. Default value is "96". hw.ramSize
Touch-screen supportWhether there is a touch screen or not on the device. Default value is "yes".hw.touchScreen
Trackball support Whether there is a trackball on the device. Default value is "yes".hw.trackBall
Keyboard supportWhether the device has a QWERTY keyboard. Default value is "yes".hw.keyboard
DPad supportWhether the device has DPad keys. Default value is "yes".hw.dPad
GSM modem supportWhether there is a GSM modem in the device. Default value is "yes".hw.gsmModem
Camera supportWhether the device has a camera. Default value is "no".hw.camera
Maximum horizontal camera pixelsDefault value is "640".hw.camera.maxHorizontalPixels
Maximum vertical camera pixelsDefault value is "480".hw.camera.maxVerticalPixels
GPS supportWhether there is a GPS in the device. Default value is "yes".hw.gps
Battery supportWhether the device can run on a battery. Default value is "yes".hw.battery
AccelerometerWhether there is an accelerometer in the device. Default value is "yes".hw.accelerometer
Audio recording supportWhether the device can record audio. Default value is "yes".hw.audioInput
Audio playback supportWhether the device can play audio. Default value is "yes".hw.audioOutput
SD Card supportWhether the device supports insertion/removal of virtual SD Cards. Default value is "yes".hw.sdCard
Cache partition supportWhether we use a /cache partition on the device. Default value is "yes".disk.cachePartition
Cache partition sizeDefault value is "66MB".disk.cachePartition.size

 

 

 

 

 

这个工具得其他操作方法,

 

 

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.

Valid actions are composed of a verb and an optional direct object:
-   list        : Lists existing targets or virtual devices.
-   list avd    : Lists existing Android Virtual Devices.
-   list target : Lists existing targets.
- create avd    : Creates a new Android Virtual Device.
-   move avd    : Moves or renames an Android Virtual Device.
- delete avd    : Deletes an Android Virtual Device.
- update avd    : Updates an Android Virtual Device to match the folders of a ne
w SDK.
- create project: Creates a new Android Project.
- update project: Updates an Android Project (must have an AndroidManifest.xml).


Action "list ":
  Lists existing targets or virtual devices.
Options:
  No options

Action "list avd":
  Lists existing Android Virtual Devices.
Options:
  No options

Action "list target":
  Lists existing targets.
Options:
  No options

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

Action "move avd":
  Moves or renames an Android Virtual Device.
Options:
  -p --path     New location path of the directory where to move the AVD
  -n --name     Name of the AVD to move or rename [required]
  -r --rename   New name of the AVD to rename

Action "delete avd":
  Deletes an Android Virtual Device.
Options:
  -n --name     Name of the AVD to delete [required]

Action "update avd":
  Updates an Android Virtual Device to match the folders of a new SDK.
Options:
  -n --name     Name of the AVD to update [required]

Action "create project":
  Creates a new Android Project.
Options:
  -k --package  Package name [required]
  -n --name     Project name
  -a --activity Activity name [required]
  -t --target   Target id of the new project [required]
  -p --path     Location path of new project [required]

Action "update project":
  Updates an Android Project (must have an AndroidManifest.xml).
Options:
  -t --target   Target id to set for the project [required]
  -p --path     Location path of the project [required]
  -n --name     Project name

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值