16

I'm new to android app dev. When I created a new AVD, when I click start on this AVD: I get the following:

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

4 Answers 4

30

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.

Original Source

3
  • I tried your latter solution. I can't even create a AVD now, with the ERROR: [2013-08-30 18:33:29 - SDK Manager] Error: null
    – jerryh91
    Aug 30, 2013 at 23:31
  • I'll try your former soln. What's so special about the D drive? How do you know that's where the emulator and config files are? When I looked at my Path listed in AVD details, it seems to point to the appropriate folder, containing "config.ini" and "userdata.img"
    – jerryh91
    Aug 30, 2013 at 23:47
  • mklink worked for me as trying to move/replace the emulator manager would always try to re-write to the wrong folder
    – ScottN
    Dec 11, 2013 at 19:01
11

Simply if nothing works for you, just copy the .android folder to C:\Users\.android.

5
  • 1
    I did not ask this question but found this thread as I had the same problem!
    – Mokkapps
    Dec 11, 2013 at 9:46
  • Worked for me too. +1 I guess everytime I create a new avd I have to update my C:\ folder since it gets created in the D:\
    – RED_
    Dec 12, 2013 at 17:20
  • @Surya How do I do this on XP?
    – Volatil3
    Apr 12, 2014 at 15:47
  • @Volatil3 copy the .android folder to C:\Users\YourName\.android or to C:\Users\.android
    – Surya
    Apr 18, 2014 at 11:52
  • thanks this works :D i tried to create a mklink but it was already there, the difference was that .android folder in my c drive was having different content that the one in d drive, so copying content helped
    – S4beR
    Oct 1, 2014 at 10:27
3

I had the same issue, and the first Umer Farooq's suggestion solved it. There was already the folder .android in C:/Users/MyName folder. I compressed it to the .android.zip for the backup purpose, and then deleted the folder C:/Users/MyName/.android. Then I opened a command prompt (it was already located at C:/Users/MyName) and executed a command:

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

Then I restarted eclipse and launched the AVD. The virtual device has been created and it worked well.

1
  • your solution works, what surprises me is that the bug is not fixed yet (nov 2014)
    – user365268
    Dec 3, 2014 at 11:32
1

my avd was in folder d:\c_data.android. it was searching in folder c:\users\rkk.android. i copied avd folder from d:\ and pasted in c:\users\rkk.android. And it was success.

Not the answer you're looking for? Browse other questions tagged or ask your own question.