Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm just starting to use Eclipse and ADT and I have some issues, the Android Emulator don't start :

[2011-07-10 15:32:25 - Android_FirstApp] ------------------------------ [2011-07-10 15:32:25 - Android_FirstApp] Android Launch! [2011-07-10 15:32:25 - Android_FirstApp] adb is running normally. [2011-07-10 15:32:25 - Android_FirstApp] Performing samr1.Android_FirstApp.Android_FirstAppActivity activity launch [2011-07-10 15:32:25 - Android_FirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'Android2.1' [2011-07-10 15:32:25 - Android_FirstApp] Launching a new emulator with Virtual Device 'Android2.1' [2011-07-10 15:32:26 - Emulator] PANIC: Could not open: C:\Users\Sam\.android/avd/Android2.1.ini 

The path isn't correct, though the path in Android2.1.ini is correct. The User folder is located in an another disk.

How can I modify the start path of Android Emulator ? I can't find where.

Thanks


EDIT : I found that graphical AVD Manager creates AVD directory inside C:\Users\.android\ on Windows 7 : Default location of AVD files

But using Command Line doesn't work. So i moved my AVD files in C:\Users\Sam\ and now it works.

like image 335
SamR1 Avatar asked Jul 10 '11 13:07

SamR1


People also ask

How do I change the default location for Android emulator?

First, run your Android Emulator and click on the three dots on the menus beside. On the left pane, select Location and change the coordinates according to your location. Press the Send button, changes will immediately take effect.

How do I fix Android emulator not working?

If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.

Why Android emulator is not opening?

If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.


1 Answers

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.

like image 94
Daniel S. Fowler Avatar answered Sep 27 '22 19:09

Daniel S. Fowler