windows – Why does the Android emulator report "unknown virtual device", when the device is in my user directory?-ThrowExceptions

Exception or error:

I installed all the prerequisites for Android development. I created a virtual device through Eclipse and tried to run the Hello World sample application in that device. I received the following error message.

emulator: ERROR: unknown virtual device name: ‘Android21Device’
emulator: could not find virtual device named ‘Android21Device’

I get the same error when I try to start the device from the command line and through the SDK program.

I can see the device directory and files at


How to solve:

Android Virtual Device Tool

The Virtual Device tool in the SDK Manager creates virtual devices in your user profile directory… in this case a secondary drive


But, the emulator tries to load virtual device images from the system drive


Directory Junction

There are two workarounds. First, you can create a directory hard-link (or junction) from the system drive android folder to the one in your user profile. In Windows 7, you can use the following command

mklink /J C:\Users\anthony\.android D:\Users\anthony\.android

Android Home

The Android SDK Manager and emulator can use an environment variable ANDROID_SDK_HOME to identify the location of the .android directory. Set a user or environment variable

ANDROID_SDK_HOME = 'D:\Users\anthony'


If you find:

emulator: ERROR: unknown virtual device name: ‘Android21Device’
emulator: could not find virtual device named ‘Android21Device’`

Just change your environment variables in the path in which your .android is found.

  1. create your avd name such as hello in android sdk and avd manager
  2. start launch then if you find the error like above
  3. open the details
  4. see the path and copy the path example of path C:\Users\\\avd\hello.avd
  5. open your variable environment by start->computer>right click>properties>advance system setting>variable environment> system variable>
  6. see in the system variable where the variable is PATH then edit
  7. click the variable value then add the C:\Users\\\avd\hello.avd preceded by a semicolon(;). For example: C:\Program Files\Java\jdk1.6.0_21\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Users\<something>\Contacts\.android\avd\hello.avd
  8. ok.then restart your computer…
  9. open eclipse then start your avd again…


You need to restart eclipse after closing it. File -> Restart will not help.


I was also getting the same Error and My resolution is below

  1. Setting the ANDROID_SDK_HOME—-Not worked for me
  2. Creating Directory Junction—–Not worked
  3. Now I went to the .android folder which has been created in some other location, open the avd and .ini file of the avd and edited it with the patch which system wants i.e “C:\Users\.android” and this worked for me 🙂 yupiiii

Leave a Reply

Your email address will not be published. Required fields are marked *