Android - 无法找到与目标“Android 1.6”错误兼容的AVD [英] Android - Failed to find an AVD compatible with target 'Android 1.6' error

查看:207
本文介绍了Android - 无法找到与目标“Android 1.6”错误兼容的AVD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图首次为Android运行一个Hello World应用程序,但是我不断得到:

 当我尝试创建一个AVD时,找不到与目标'Android 1.6'

错误的AVD。



为了解决这个问题,我尝试了以下解决方案:




  • 检查我有正确的软件包安装。我有Android SDK工具修订版11,Android SDK平台 - 工具修订版4,SDK平台4,7,8,9,10,11和12,Android兼容包。

  • 我已经检查我的PATH环境变量是否指向工具和平台工具文件夹的正确位置。

  • 在不同的平台级别设置项目等。

  • 暂时关闭我的病毒防护



尽管如此,我总是收到类似的错误消息。 b
$ b

这是我尝试启动时在eclipse控制台中获得的。

  2011-05-28 11:43:47  -  HelloAndroid] ------------------------------ 
[2011- 05-28 11:43:47 - HelloAndroid] Android发布!
[2011-05-28 11:43:47 - HelloAndroid] adb正常运行。
[2011-05-28 11:43:47 - HelloAndroid]执行com.androidbook.hello.HelloActivity活动启动
[2011-05-28 11:43:47 - HelloAndroid]找不到AVD与目标Android 1.6兼容。
[2011-05-28 11:44:27 - SDK Manager]无法创建文件'C:\Windows\system32\config\systemprofile\.android\avd\Gingerbread.avd \sdcard.img',中止...
[2011-05-28 11:44:27 - SDK Manager]无法写入'C:\Windows\system32\config\systemprofile\\ \\ .android\avd\Gingerbread.avd\sdcard.img',中止...
[2011-05-28 11:44:27 - SDK管理器]无法创建SD卡。
[2011-05-28 11:45:09 - HelloAndroid]仍然没有兼容的AVDs与目标'Android 1.6':中止发射。
[2011-05-28 11:45:09 - HelloAndroid]执行com.androidbook.hello.HelloActivity活动启动
[2011-05-28 11:45:11 - HelloAndroid]启动取消!

我注意到我的软件包安装在:

  C:\Program Files\Android\android-sdk 

因为这是在选择安装的软件包选项时在Android SDK和AVD管理器的顶部说的。但是当我选择虚拟设备选项时,它正在寻找虚拟设备的位置:

  C:\Windows\\ \\system32\config\systemprofile\.android\avd。 

在我正在关注的书中,有一个他的SDK和AVD Manager的屏幕截图,寻找虚拟设备在

  C:\Documents and Setting\Dave\.android\avd 

文件夹。如果我改变经理寻找这些东西,那会对我有什么不同吗?任何人都可以告诉我如何做到这一点?



感谢任何帮助。我只想要破解!



非常感谢

解决方案

我通过以下方法解决了这个问题:



我将一个新的环境变量ANDROID_SDK_HOME设置到与我的HOME环境变量相同的位置,它是C:\Users\ MyName(这是这个文章)



这更改了Android SDK和AVD管理器正在寻找虚拟设备的位置。当我添加新设备时,我没有似乎有任何问题(实际上,我在启动我的应用程序的过程中,我实际上已经关闭所有的东西,重新启动,所以它可以找到我刚刚创建的AVD)。



我惊讶于AVD实际需要多长时间才能完全启动并安装我的10行应用程序。它真的需要大约5分钟,所以我可以看到你好世界。



仍然...胜利是我的!


I'm trying to run a Hello World app for Android for the first time, but I keep getting a:

Failed to find an AVD compatible with target 'Android 1.6'

error when I try to create an AVD.

I have tried the following solution in order to fix the issue:

  • Checked that I have the right packages installed. I have Android SDK Tools Revision 11, Android SDK Platform-Tools Revision 4, SDK Platforms 4, 7, 8, 9, 10, 11 and 12, Android Compatability package.
  • I've checked that my PATH environment variable is pointing to the right places for the Tools and the Platform-Tools folders.
  • Played around with setting the project at different platform levels etc.
  • Switching off my Virus Protection temporarily

I always get a similar error message, though.

This is what I get in the eclipse console when I try to launch.

[2011-05-28 11:43:47 - HelloAndroid] ------------------------------
[2011-05-28 11:43:47 - HelloAndroid] Android Launch!
[2011-05-28 11:43:47 - HelloAndroid] adb is running normally.
[2011-05-28 11:43:47 - HelloAndroid] Performing com.androidbook.hello.HelloActivity activity launch
[2011-05-28 11:43:47 - HelloAndroid] Failed to find an AVD compatible with target 'Android 1.6'.
[2011-05-28 11:44:27 - SDK Manager] could not create file 'C:\Windows\system32\config\systemprofile\.android\avd\Gingerbread.avd\sdcard.img', aborting...
[2011-05-28 11:44:27 - SDK Manager] could not write to 'C:\Windows\system32\config\systemprofile\.android\avd\Gingerbread.avd\sdcard.img', aborting...
[2011-05-28 11:44:27 - SDK Manager] Failed to create the SD card.
[2011-05-28 11:45:09 - HelloAndroid] Still no compatible AVDs with target 'Android 1.6': Aborting launch.
[2011-05-28 11:45:09 - HelloAndroid] Performing com.androidbook.hello.HelloActivity activity launch
[2011-05-28 11:45:11 - HelloAndroid] Launch canceled!

I notice that my packages are installed at:

C:\Program Files\Android\android-sdk

because thats what is says at the top of the Android SDK and AVD manager when the Installed Packages option is selected. But when I choose the Virtual Devices option, the location it is looking for the virtual devices in:

C:\Windows\system32\config\systemprofile\.android\avd. 

In the book that I'm following there is a screenshot of his SDK and AVD Manager looking for the virtual devices in a

C:\Documents and Setting\Dave\.android\avd

folder. Will it make any difference to me if I change where the Manager looks for this stuff? Can anyone tell me how I can do that?

Grateful for any help on this. I just want to get cracking!

Many thanks

解决方案

In this end I solved in by the following method:

I set a new environment variable ANDROID_SDK_HOME to the same location as my HOME environment variable which is C:\Users\MyName (This was suggested by one of the commenters in this article)

This changed the location that the Android SDK and AVD manager was looking for virtual devices in. When I added a new device then, I didn't seem to get any problem (Actually as I did this in the process of launching my app, I actually had to close everything down and relaunch so it could find the AVD that I had just created).

I'm amazed at how long the AVD actually takes to fully fire-up and install my 10 line app. It literally took about 5 minutes so I could see "Hello World".

Still... victory is mine!

这篇关于Android - 无法找到与目标“Android 1.6”错误兼容的AVD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆