28

I cannot start a virtual devices on android SDK when I press the start button on AVD manager, this error shows on my screen:

Starting emulator for AVD 'AVD_for_Galaxy_Nexus_by_Google'
PANIC: Could not find AVD_for_Galaxy_Nexus_by_Google.ini file in
  $ANDROID_AVD_HOME nor in $HOME/.android/avd"!

Here is the screen shot:

screen shoot

jww
  • 97,681
  • 90
  • 411
  • 885
  • Possible duplicate of [Cannot start avd emulator on android studio 1.0](http://stackoverflow.com/questions/27494086/cannot-start-avd-emulator-on-android-studio-1-0) – jww Dec 26 '14 at 04:31
  • this resolve my problem http://stackoverflow.com/a/27603135/2652524 – Gujarat Santana Jan 08 '16 at 04:29

10 Answers10

22

You'll just have to set the ANDROID_AVD_HOME environment variable and restart Android Studio.

timarcosdias
  • 385
  • 3
  • 10
15

just this command worked for me : sudo cp -R /root/.android $HOME

Moshiur Rahman
  • 347
  • 2
  • 8
  • This might work, but will need to do this everyrime you install a new avd. How can one make android stuido to install it in the right place from the beginning? – mrfr Jun 05 '18 at 12:36
9

I solved this problem, on Ubuntu, by finding where the .avd and .ini files from the AVD manager were downloaded. By default, these are named after the virtual device created in the AVD manager and will be like this: Nexus_4_API_22.ini and will have a .ini and .avd file both with the same name. In my case, they were located in /root/.android/avd/.

From there, I copied both the ini and avd files of the virtual device (If you have more than one, copy all of the virtual devices you want) into $HOME/.android/avd/, as that is one of the locations the message requested. On linux, sudo cp /root/.android/avd/Virual_Device_XX.ini $Home/.android/avd/ and do the same with the .avd file. Hope this helps anyone who runs into this issue.

Alex D
  • 91
  • 1
  • 4
  • I had simillar problem – needed `armenu.ini` and had `AVD_for_Nexus_4_by_Google.ini armenu.ini`, so solved by: `cd ~/.android/avd && ln -s AVD_for_Nexus_4_by_Google.ini armenu.ini`. – pevik Jan 30 '16 at 21:57
  • thanks man this solved my problem.. I was not able to start virtual device on ubuntu 16.04.. just copying /root/.android/avd/Nexus_S_API_28_new.ini to /home/pp/.android/avd worked.. I was not having .android folder on home so created that manually.. Now emulator is finding correct path – Prashant Jul 21 '19 at 07:17
6

For me the Environment variable was missing altogether. adding "ANDROID_AVD_HOME" as environment variable solved it. also a tip, enter the path without the "/.android/avd" part, as the application automatically adds this to it's search you don't need to specify them anymore. e.g. Env. Variable : ANDROID_AVD_HOME Value : C:\users\%USERNAME%\Androidapps

Android studio will for emulators under C:\users\%USERNAME%\Androidapps.android\avd

G. Schepens
  • 86
  • 1
  • 2
5

Just create a symlink:

ln -s /root/.android/ /home/user/.android/

This way you will solve the issue with the emulator because all sdk data is being written on /root/.android/

cristid9
  • 1,070
  • 1
  • 17
  • 37
2

Or instead ANDROID_AVD_HOME enter ANDROID_SDK_HOME and Studio will work: Cannot start avd emulator on android studio 1.0

Community
  • 1
  • 1
Hrvoje
  • 119
  • 1
  • 1
  • 8
0

I just encountered this problem again and realized that newer versions of Android Studio and SDK are placing AVDs along the following path for OSX:

Users/yourUsername/Library/Android/sdk/.android/avd as opposed to the older practice of placing AVDs here: Users/yourUsername/.android/avd

So, I just updated my bash_profile file to point ANDROID_AVD_HOME to the new location--which did indeed contain the ini file for the AVD I'd created, and then the launch went fine.

Wulf
  • 379
  • 1
  • 6
  • 16
0

because android SDK environment ANDROID_SDK_HOME, wrong path. /usr/local/opt/android-sdk or /Users/[userName]/Library/Android/sdk TRUE

Kaan Uygur
  • 1
  • 1
  • 2
  • I'm not saying this is incorrect, but how is this more useful than the other answers? – Ray Jun 04 '17 at 01:52
0

Make sure your ANDROID_SDK_HOME or ANDROID_AVD_HOME is defined correctly and AVD is installed in AVD Manager.

You can get the avd folder path by clicking view details of any AVD you have installed.

Directories are searched by emulator in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME\avd and $HOME.android\avd .

Check whether the avd folder path matches any of the above path. Make sure there is no empty avd folder in any of the above path of defined environment variables.

Dharaneshvar
  • 1,348
  • 1
  • 6
  • 12
-4

Try changing the environment variable definition from ANDROID_AVD_HOME to $ANDROID_AVD_HOME.

  • 1
    I think the message is produced by Android Device Manager. I don't think he can easily change it. If its easily changed, then you should probably provide instructions. – jww Dec 26 '14 at 04:30