Eclipse运行工程报AVD没有找到错误解决过程

来源:互联网 发布:卫视 知乎 编辑:程序博客网 时间:2024/05/21 06:46


Eclipse, AVD, 工程, 运行, 解决
Eclipse运行,出现错误:
[2009-07-18 06:55:12 - TestProject] Failed to find an AVD compatible with target 'Android 1.5'. Launch aborted.
在CMD下
键入:C:/Android1.5_R3/tools>emulator.exe
emulator: ERROR: You did not provide the name of an Android Virtual Device
with the '-avd <name>' option. Read -help-avd for more information.
If you *really* want to *NOT* run an AVD, consider using '-data <file>'
to specify a data partition image file (I hope you know what you're doing).
按照提示键入:C:/Android1.5_R3/tools>emulator.exe -help-avd
  use '-avd <name>' to start the emulator program with a given Android
  Virtual Device (a.k.a. AVD), where <name> must correspond to the name
  of one of the existing AVDs available on your host machine.
See -help-virtual-device to learn how to create/list/manage AVDs.
  As a special convenience, using [email=]'@<name>'[/email] is equivalent to using
  '-avd <name>'.

按照提示键入:C:/Android1.5_R3/tools>emulator.exe -help-virtual-device
  An Android Virtual Device (AVD) models a single virtual
device running the Android platform that has, at least, its own
kernel, system image and data partition.
Only one emulator process can run a given AVD at a time, but
you can create several AVDs and run them concurrently.
You can invoke a given AVD at startup using either '-avd <name>'
or [email=]'@<name>'[/email], both forms being equivalent. For example, to launch
the AVD named 'foo', type:
     emulator @foo
The 'android' helper tool can be used to manage virtual devices.
For example:
   android create avd -n <name> -t 1  # creates a new virtual device.
   android list avd                   # list all virtual devices available.
Try 'android --help' for more commands.
Each AVD really corresponds to a content directory which stores
persistent and writable disk images as well as configuration files.
Each AVD must be created against an existing SDK platform or add-on.
For more information on this topic, see -help-sdk-images.
SPECIAL NOTE: in the case where you are *not* using the emulator
with the Android SDK, but with the Android build system, you will
need to define the ANDROID_PRODUCT_OUT variable in your environment.
See -help-build-images for the details.
里面有两行关键命令。
键入:C:/Android1.5_R3/tools>android list avd
Available Android Virtual Devices:
果然没有一个AVD

键入:C:/Android1.5_R3/tools>android create avd -n foo -t 1  开始产生AVD
.......
一顿选项输入后
Created AVD 'foo' based on Android 1.1
??? 产生的AVD是1.1平台上的??  那如何产生1.5平台上的呢??
再次键入 C:/Android1.5_R3/tools>emulator.exe
报错,提示没有AVD名字
再次键入:C:/Android1.5_R3/tools>emulator.exe -avd foo
久违的画面出现了。 :)

再次在Eclipse里运行工程,还是报错:
[2009-07-18 07:26:37 - TestProject] Failed to find an AVD compatible with target 'Android 1.5'. Launch aborted.
在Android 1.5上的AVD 还是没有。所以起不来..
难道在生成AVD的第一个选项:
C:/Android1.5_R3/tools>android create avd -n foo -t 1
Android 1.1 is a basic Android platform.
Do you wish to create a custom hardware profile [no]yes
我选择了1.1平台上的??
键入C:/Android1.5_R3/tools>android create avd -h  查看帮助
......
一顿乱试,键入C:/Android1.5_R3/tools>android create avd -n foo2 -t 2
Android 1.5 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Created AVD 'foo2' based on Android 1.5
哈哈,终于产生了1.5平台上的AVD
再次在Eclipse里运行工程,终于可以了. 嘎嘎.