Android Emulator Can't Find AVD On D Drive

Published: {ts '2012-12-14 00:00:00'}
Author: Steven Neiland
Site Url: http://www.neiland.net/article/android-emulator-cant-find-avd-on-d-drive/

I have a slightly different configuration for my main windows computer in that I placed my users directory on my D:\ drive which is a raid 0+1 array. Unfortunately this confused the android emulator so that it continued to look for my avd files on the C:\ drive giving me this nice message:

PANIC: Could not open: C:\Users\Steven\.android/avd/xoom.avd

This is doubly stupid because I had just used the device manager 5 minutes ago to create that virtual device in the correct location.

Solution

If this happens to you one solution that has worked for me is to create an environment variable name "ANDROID_SDK_HOME" with a value of "D:\Users\Steven\.android"

Then restart the AVD manager and you should be able to create and start the virtual devices now (provided google has not screwed anything else up).

Quality Control Fail

Its obvious that somewhere along the line the users directory location was hardcoded into the virtual device manager. I have to say I am less than impressed with google's code review process if something like this slipped through. Finding the users directory is a simple environment variable lookup %USERPROFILE%. Not exactly rocket science.