您的位置:首页 > 移动开发 > Android开发

android 模拟器 PANIC: Could not open: AVD 解决方法

2014-03-19 14:16 405 查看
参考文章:
http://stackoverflow.com/questions/18540607/starting-emulator-for-avd-then-panic-could-not-open http://android.stackexchange.com/questions/51742/cannot-start-emulated-android-device-avd-device-in-windows-7
解决方法一:

This is a bug in the ADT Plugin. For a workaround until it is fixed use a NTFS symbolic link.

I have a C: drive for windows 7 and a D: drive for all my work and data. After installing windows 7 I relocate all my special folders from C:\Users\John Doe to 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.). NTFS can get the ADT Plugin to read from D: using a NTFS symbolic link. Open a command prompt in C:\Users\John Doe (obviously use your user name), use the mklink command.
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.

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.

Try these steps

Create a environment variable called:
ANDROID_SDK_HOME
and
set it to
C:\Users\<<Administrator>>


Open
Eclipse
> Window > Preferences
, 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.

Note The
<<Administrator>>
means
the name of your Windows account; it is where resides the folder which contains your
.android
directory

An android project member says here:

As a work-around, you can define the environment variable ANDROID_SDK_HOME to point to the directory containing your .android directory. The emulator and SDK Manager will pick it up properly.

Also you should check that the AVD is created in the location D:\NN\.android\avd (check in your screenshoots, just above the list of AVD, the path in List of existin Android Virtual Devices).
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐