Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is this Android Studio bug or am I doing wrong?

I have android studio setup on my Ubuntu machine and now whenever I try to start the emulator, it throws exception like:

Cannot launch AVD in emulator.

Output:

PANIC: Could not find Nexus_S_API_21.ini file in $ANDROID_AVD_HOME$ nor in $HOME./android/avd

So when I do:

echo $ANDROID_AVD_HOME

It shows empty which means that this path is not set and when $HOME is my /home/user

So when I go in /home/user/.android/avd there is really no .ini file. So, I am confused, when I create a virtual device, where does it go? How can I find the path where virtual devices are being created and if possible, how can I change the path to create virtual devices?

like image 863
SSC Avatar asked Sep 29 '22 03:09

SSC


2 Answers

You can find location of your avd's *.ini files in AVD Manager (GUI). Right under tab "Android Virtual Devices" there is line "List of existing Android Virtual Devices located at %here is the location%".

You can try to change system variable %android_avd_home% to something like /home/user, for example and then restart IDE (Android Studio).

Also, you can try to find useful information here: https://code.google.com/p/android/issues/detail?id=78577

Hope it helps

like image 191
krossovochkin Avatar answered Oct 16 '22 19:10

krossovochkin


I experienced this same issue on OSX, but the weird part was it only happened after I had added the ANDROID_SDK_HOME varible to my environment.

I experimented and found that if I added the ANDROID_AVD_HOME variable to my environment or I removed ANDROID_SDK_HOME, it caused it to start working.

like image 1
Edward Hogan Avatar answered Oct 16 '22 19:10

Edward Hogan