AVD - PANIC: Could not open… - not a path issue

2019-01-08 12:14发布

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.

The issue for me right now:

[2013-02-27 13:36:26 - Test2] Android Launch!
[2013-02-27 13:36:26 - Test2] adb is running normally.
[2013-02-27 13:36:26 - Test2] Performing com.example.test2.MainActivity activity launch
[2013-02-27 13:37:27 - Test2] Launching a new emulator with Virtual Device 'droidX2'
[2013-02-27 13:37:27 - Emulator] PANIC: Could not open: 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. 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. 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. Any suggestions here?

adt-bundle-windows-x86_64-20130219 was what I loaded on Windows 7 (32bit).

I'd settle for testing on the mobile that's connected to the PC but I can't get that to work either!

Any direction appreciated.

11条回答
别忘想泡老子
2楼-- · 2019-01-08 12:43

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):

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

Where "_MyLibrariesDir" is the directory that your libraries (photos, documents, etc) folders are located.

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.

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. Symlinks act a bridge between locations in a way that is transparent to user and software. Quite handy :)

查看更多
贼婆χ
3楼-- · 2019-01-08 12:45

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.

Original answer by Colin

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.

查看更多
Ridiculous、
4楼-- · 2019-01-08 12:48

Simply if nothing works for you, just copy the folder avd which you could find in your .android folder to C:\Users\<user name>\.android.

查看更多
forever°为你锁心
5楼-- · 2019-01-08 12:49

try to add new windows admin user with English language only it worked for me the user name should be in English letters

查看更多
虎瘦雄心在
6楼-- · 2019-01-08 12:50

verify that The location in which the avd was searched from is different from where it is actually created. Take a look at the screenshot below for more information.

Android Virtual Devices Manager - location of virtual devices

查看更多
走好不送
7楼-- · 2019-01-08 12:50

Pls check once in Ur ".android" folder, another/duplicate ".android" folder might have been created. 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. Cheers

查看更多
登录 后发表回答