Android Emulator can't start, 'cause of wrong folder

Solution 1:

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.

Solution 2:

  1. Create a environment variable called: ANDROID_SDK_HOME and set it to C:\Users\Administrator
  2. Open Eclipse > Window > Preferences and click in Run/Debug and String Substitution
  3. Add a new variable called: user.home and set it to C:\Users\Administrator
  4. Create an AVD and run it.

It should work now.

Solution 3:

The configuration files for your emulator might have been saved by AndroidSDK and AVD Manager some where else in your hard drive.

Do the following:

  • First search for the .android folder on you harddisk.
  • After you find that, move the .android folder to your user root directory - which may be "C:\Users\hallo\" in your case.

These type of project creation errors(with cause and solution) is described here.

Solution 4:

The configuration files for your emulator might have been saved by AndroidSDK and AVD Manager some where else in your hard drive.

Do the following:

First search for the .android folder on you harddisk. After you find that, move the .android folder to your user root directory - which may be "C:\Users\something\" in your case.

Other Method

Check the location of old folder you can open eclipse Navigate to Windows--> Preferences-->Android-->Expand it and Select Build Find the Value of Default Debug keystore and you will know your .android folder location.

Then mklink /J "old folder location" "C:\Users\Something\"

Solution 5:

if anyone is interested on the same problem in Linux (Ubuntu 11.10) the solution is NOT run Android SDK Manager as root. Aparently, SDK expects to be runned by a regular user, and it tries to work with the main user folder, that's why the error. This is what I suspect.