简体   繁体   English

“为AVD启动模拟器”然后恐慌:无法打开...“

[英]“Starting emulator for AVD” then Panic: could not open…"

I'm new to android app dev. 我是android app dev的新手。 When I created a new AVD, when I click start on this AVD: I get the following: 当我创建一个新的AVD时,当我点击这个AVD的开始:我得到以下内容:

Starting emulator for AVD 'Nexus_4_16_AVD'
PANIC: Could not open: Nexus_4_16_AVD

This is a bug in the ADT Plugin. 这是ADT插件中的一个错误。 For a workaround until it is fixed use a NTFS symbolic link. 有关解决方法,直到它被修复使用NTFS符号链接。

I have a C: drive for windows 7 and a D: drive for all my work and data. 我有一个用于Windows 7的C:驱动器和用于我所有工作和数据的D:驱动器。 After installing windows 7 I relocate all my special folders from C:\\Users\\John Doe to D:\\John Doe. 安装Windows 7后,我将所有特殊文件夹从C:\\ Users \\ John Doe重定位到D:\\ John Doe。 The ADT Plugin is trying to load the emulator from C: when it and the configure files are on D: (PANIC: Could not open etc.). ADT插件尝试从C:加载模拟器时,它和配置文件在D:(PANIC:无法打开等)。 NTFS can get the ADT Plugin to read from D: using a NTFS symbolic link. NTFS可以使用NTFS符号链接从D:读取ADT插件。 Open a command prompt in C:\\Users\\John Doe (obviously use your user name), use the mklink command. 在C:\\ Users \\ John Doe中打开命令提示符(显然使用您的用户名),使用mklink命令。

 mklink /J "C:\Users\John Doe\\.android" "D:\John Doe\\.android"

Now when the ADT plugin is trying to reference .android on C:, NTFS sends the request to D: and the emulator starts correctly. 现在,当ADT插件尝试在C:上引用.android时,NTFS将请求发送到D:并且模拟器正确启动。

Original Source 原始来源

OR 要么

If it is not a path issue, then: 如果它不是路径问题,那么:

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 Open Eclipse > Window > Preferences并单击Run/Debug和String Substitution添加一个名为user.home的新变量并将其设置为C:\\Users\\Administrator创建AVD并运行它。

Original Source 原始来源

如果没有任何作用,只需将.android文件夹复制到C:\\ Users \\ .android即可。

I had the same issue, and the first Umer Farooq's suggestion solved it. 我有同样的问题,第一个Umer Farooq的建议解决了它。 There was already the folder .android in C:/Users/MyName folder. C:/ Users / MyName文件夹中已存在文件夹.android。 I compressed it to the .android.zip for the backup purpose, and then deleted the folder C:/Users/MyName/.android. 我将其压缩到.android.zip进行备份,然后删除文件夹C:/Users/MyName/.android。 Then I opened a command prompt (it was already located at C:/Users/MyName) and executed a command: 然后我打开了一个命令提示符(它已经位于C:/ Users / MyName)并执行了一个命令:

 mklink /J "C:\Users\MyName\\.android" "D:\\.android"

Then I restarted eclipse and launched the AVD. 然后我重新启动了eclipse并启动了AVD。 The virtual device has been created and it worked well. 虚拟设备已创建,并且运行良好。

my avd was in folder d:\\c_data.android. 我的avd位于文件夹d:\\ c_data.android中。 it was searching in folder c:\\users\\rkk.android. 它在文件夹c:\\ users \\ rkk.android中搜索。 i copied avd folder from d:\\ and pasted in c:\\users\\rkk.android. 我从d:\\复制了avd文件夹并粘贴在c:\\ users \\ rkk.android中。 And it was success. 这是成功的。

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

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