简体   繁体   English

AVD-PANIC:无法打开...-路径问题

[英]AVD - PANIC: Could not open… - not a path issue

I want to write an Android app and I've started this morning by loading JDK, eclipse, SDK etc, all from the adt-bundle-windows-x86_64-20130219 from http://developer.android.com . 我想编写一个Android应用程序,今天早上我开始从http://developer.android.comadt-bundle-windows-x86_64-20130219 加载JDK,eclipse,SDK等。

The issue for me right now: 现在对我来说的问题是:

[2013-02-27 13:36:26 - Test2] Android Launch! [2013-02-27 13:36:26-Test2] Android启动!
[2013-02-27 13:36:26 - Test2] adb is running normally. [2013-02-27 13:36:26-Test2] adb正常运行。
[2013-02-27 13:36:26 - Test2] Performing com.example.test2.MainActivity activity launch [2013-02-27 13:36:26-Test2]执行com.example.test2.MainActivity活动启动
[2013-02-27 13:37:27 - Test2] Launching a new emulator with Virtual Device 'droidX2' [2013-02-27 13:37:27-Test2]使用虚拟设备“ droidX2”启动新的模拟器
[2013-02-27 13:37:27 - Emulator] PANIC: Could not open: droidX2 [2013-02-27 13:37:27-模拟器] PANIC:无法打开:droidX2

I've been sifting though posts on the web all morning about AVD and I haven't seen one that didn't involve the path being messed up and the .ini not found. 我一直在网上搜寻有关AVD的帖子,但我还没有看到没有涉及到混乱的路径以及找不到.ini帖子。 I don't think I've got a path issue. 我认为我没有遇到问题。 AVD is looking for files on D:\\USERS\\XXX\\.android\\avd and that's where the files are. AVD在D:\\USERS\\XXX\\.android\\avd上寻找文件,这就是文件所在的位置。 So don't understand why the emulator can't open. 所以不明白为什么模拟器无法打开。

I've done the most basic things like remove and re-install everything, read the notes at orace etc. Basically I'm stuck. 我已经完成了一些最基本的操作,例如删除并重新安装了所有内容,阅读了orace上的说明等。 Any suggestions here? 有什么建议吗?

adt-bundle-windows-x86_64-20130219 was what I loaded on Windows 7 (32bit). adt-bundle-windows-x86_64-20130219是我在Windows 7(32位)上加载的。

I'd settle for testing on the mobile that's connected to the PC but I can't get that to work either! 我愿意在连接到PC的移动设备上进行测试,但是我也无法使它正常工作!

Any direction appreciated. 任何方向赞赏。

This has been asked a few times already, try these: 已经问过几次了,请尝试以下方法:

Create a environment variable called: ANDROID_SDK_HOME and set it to C:\\Users\\Administrator Open Eclipse > Window > Preferences and click in Run/Debug and String Substitution Add a new variable called: user.home and set it to C:\\Users\\Administrator Create an AVD and run it. 创建一个名为:ANDROID_SDK_HOME的环境变量,并将其设置为C:\\ Users \\ Administrator。打开Eclipse> Window> Preferences,然后单击Run / Debug和String Substitution。添加一个名为:user.home的新变量,并将其设置为C:\\ Users \\管理员创建一个AVD并运行它。

Original answer by Colin 柯林的原始答案

an android project member says here : 一个android项目成员在这里说:

As a work-around, you can define the environment variable ANDROID_SDK_HOME to point to the directory containing your .android directory. 解决方法是,您可以定义环境变量ANDROID_SDK_HOME指向包含.android目录的目录。 The emulator and SDK Manager will pick it up properly. 仿真器和SDK Manager将正确地将其拾取。

verify that The location in which the avd was searched from is different from where it is actually created. 验证从其中搜索avd的位置与实际创建的位置不同。 Take a look at the screenshot below for more information. 请看下面的屏幕截图以获取更多信息。

Android虚拟设备管理器-虚拟设备的位置

ANOTHER OPTION: Symlinking... 另一个选项:符号链接...

In a command prompt (with admin privileges), change directory ("cd") to " C:\\Users\\YourUserName.android " and then use the following command to create a symlink to the avd directory (notice the direction of the slashes): 在命令提示符下(具有管理员权限),将目录(cd)更改为“ C:\\ Users \\ YourUserName.android ”,然后使用以下命令创建到avd目录的符号链接(注意斜杠的方向) :

 mklink /D avd D:\\_MyLibrariesDir\\.android\\avd 

Where " _MyLibrariesDir " is the directory that your libraries (photos, documents, etc) folders are located. _MyLibrariesDir ”是您的库(照片,文档等)文件夹所在的目录。

And you're done! 大功告成!


Explanation: This has the same effect as the ANDROID_SDK_HOME option except that you can now browse to [C:\\Users\\YourUserName\\.android\\avd\\*] and [D:_MyLibrariesDir\\.android\\avd\\*] and both will take you to the same spot. 说明:这与ANDROID_SDK_HOME选项具有相同的作用,除了您现在可以浏览到[C:\\ Users \\ YourUserName \\ .android \\ avd \\ *][D:_MyLibrariesDir \\ .android \\ avd \\ *],并且两者都需要您到同一地点。

This differs from a shortcut in that shortcuts do not act as directories, so if you just had a shortcut to the "avd" folder, you could not go to " C:\\Users\\YourUserName\\.android\\avd* " as it would produce a file not found error and if you tried to click on an avd shortcut file it would take you to [D:_MyLibrariesDir\\.android\\avd\\*] instead of keeping you on the C drive. 这与快捷方式的不同之处在于,快捷方式不用作目录,因此,如果您仅具有“ avd”文件夹的快捷方式,则无法像这样直接转到“ C:\\ Users \\ YourUserName \\ .android \\ avd * ”产生文件未找到错误,如果您尝试单击avd快捷文件,它将带您到[D:_MyLibrariesDir \\ .android \\ avd \\ *],而不是将您保留在C驱动器上。 Symlinks act a bridge between locations in a way that is transparent to user and software. 符号链接以对用户和软件透明的方式充当位置之间的桥梁。 Quite handy :) 非常方便:)

我通过以管理员身份运行Eclipse来解决AVD Panic问题。

On Ubuntu check the current user if you run eclipse as root (sudo) eclipse could NOT find the /root/.android set the user home 在Ubuntu上,检查当前用户是否以root(sudo)身份运行eclipse eclipse找不到/root/.android将用户设置为home

user.home /home/<user>/

and copy the AVD files into the new directory than changes the privileges 并将AVD文件复制到新目录中,然后更改权限

cd /home/<user>/
chgrp <user> -R .android
chgrp <user> -R .android

简单地说,如果对您没有任何帮助,只需将您在.android文件夹中可以找到的avd文件夹复制到C:\\Users\\<user name>\\.android .android

Pls check once in Ur ".android" folder, another/duplicate ".android" folder might have been created. 请在Ur“ .android”文件夹中检查一次,可能已创建另一个/重复的“ .android”文件夹。 If "YES" is Ur answer then do this thing because in my case that thing was happened. 如果您的回答是“是”,那么请执行此操作,因为在我的情况下,该操作已发生。 Simply I just kept only the latest ".android" folder in this directory "C:\\Users\\USER NAME\\" (removed the duplicated one) and then emulator started working for me. 只是我只在该目录“ C:\\ Users \\ USER NAME \\”中保留了最新的“ .android”文件夹(删除了重复的文件夹),然后模拟器开始为我工作。 Cheers 干杯

尝试用英语添加新的Windows admin用户,但对我有用,用户名应该为英文字母

Found a simple way to make it work - worth trying: 1. If you do not have it yet - create a new AVD with the problematic name (in this case droidX2) if you see an overwrite warning - overwrite it. 找到了一种使其工作的简单方法-值得一试:1.如果尚未使用-如果看到覆盖警告,则使用名称有问题的新AVD(在本例中为droidX2)创建-将其覆盖。 2. Delete the new AVD you just created in step 1. 3. If you have another AVD it's OK, if not - create one. 2.删除刚在步骤1中创建的新AVD。3.如果有另一个AVD,可以,如果没有,请创建一个。 4. Retry running the Eclipse project as an Android application - now it should run 4.重试将Eclipse项目作为Android应用程序运行-现在它应该运行

Setting the ANDROID_SDK_HOME environment variable alone works fine for Win7 and earlier but did not help me on Win8. 单独设置ANDROID_SDK_HOME环境变量在Win7及更早版本中可以正常使用,但在Win8上却无济于事。

For poor tortured souls using the piece of crap which is Windows 8, go to wherever you've installed the Android SDK (eg C:\\SDK\\Android or C:\\Users\\JoeCitizen\\AppData\\Local\\Android\\android-sdk ) and make sure both AVD Manager.exe and SDK Manager.exe are set to run as Administrator for all users. 对于使用Windows 8的残酷折磨的灵魂,请转至安装Android SDK的位置(例如C:\\SDK\\AndroidC:\\Users\\JoeCitizen\\AppData\\Local\\Android\\android-sdk )并确保将AVD Manager.exeSDK Manager.exe都设置为以管理员身份对所有用户运行。 Once I did that it worked fine. 一旦我这样做,它就可以正常工作。

Yet another deceptive problem-which-shouldn't-be-a-problem caused by the complete fail which is permission management circa Windows 8. 由完全失败引起的另一个欺骗性问题-不应是问题-Windows 8左右的权限管理。

Using Windows 7, Eclipse, Android SDK tools 23.0.4 使用Windows 7,Eclipse,Android SDK工具23.0.4

First time I followed the exact instruction on http://developer.android.com/training/index.html I got the error "PANIC: could not open.." whenever 'Start' emulator. 第一次我按照http://developer.android.com/training/index.html上的确切说明进行操作时,只要有“启动”模拟器,就会出现错误“ PANIC:无法打开..”。

Solution: System property popup/Enviroment Variables/ System variables, Added new entry name="ANDROID_SDK_HOME", value = "D:\\DATA\\Users\\ThisUser\\" Then it starts work! 解决方案:系统属性弹出窗口/环境变量/系统变量,添加了新的条目名称=“ ANDROID_SDK_HOME”,值=“ D:\\ DATA \\ Users \\ ThisUser \\”然后它开始工作!

"D:\\DATA\\Users\\ThisUser\\" is parent folder where ".android/avd" folder exists. “ D:\\ DATA \\ Users \\ ThisUser \\”是父文件夹,其中存在“ .android / avd”文件夹。 avd folder path here is "D:\\DATA\\Users\\ThisUser.android\\avd" avd文件夹路径是“ D:\\ DATA \\ Users \\ ThisUser.android \\ avd”

Note that you must put "D:\\DATA\\Users\\ThisUser\\", not "D:\\DATA\\Users\\ThisUser**.android**" 请注意,您必须放置“ D:\\ DATA \\ Users \\ ThisUser \\”,而不是“ D:\\ DATA \\ Users \\ ThisUser **。android **”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM