6

I 've downloaded android studio 1.0 but when I create an emulator and i try to start it gives the following message PANIC: Could not find android2.ini file in $ANDROID_AVD_HOME nor in $HOME/.android/avd

AFS
  • 317
  • 1
  • 4
  • 7

6 Answers6

13

Ubuntu

My .android/avd was in root folder, but setting ANDROID_AVD_HOME to it made no good. So I just copied files from /root/.android/avd to /home/username/.android/avd Not best solution, but working

Lina Shyshova
  • 546
  • 5
  • 12
4

just set ANDROID_SDK_HOME system variable to point the home directory of android avd, just like you did with JAVA_HOME :)

aurelius
  • 3,946
  • 7
  • 40
  • 73
  • but is ANDROID_AVD_HOME what is looking for – AFS Dec 15 '14 at 22:29
  • yes, so you need to add it in system variables, if you do that then the path to the avd will be available anywhere. – aurelius Dec 15 '14 at 22:31
  • I've set ANDROID SDK_HOME like home/user/Android because inside this folder its located the SDK folder but it doesn't work also the message said that it's not in $HOME/.android/avd but the file it's located there. – AFS Dec 15 '14 at 22:42
  • inside Android directory there is and SDK directory, include it also in the string path – aurelius Dec 15 '14 at 22:44
  • well, someone else has had this problem, maybe you'll find something useful here https://code.google.com/p/android/issues/detail?id=78577 Cheers! – aurelius Dec 15 '14 at 22:52
  • Didn't work either on Windows 8.1. I have set `ANDROID_SDK_HOME`, `$ANDROID_SDK_HOME`, `$ANDROID_AVD_HOME`, `ANDROID_AVD_HOME`. Android Studio 1.1.0. How did Google let such a serious bug slip away? – Shailen Mar 01 '15 at 21:37
  • 1
    You will need to restart Android Studio (and AVD manager) before it can see the new environment variable(s) – James Jun 27 '15 at 12:32
3
  1. in the environment variables add a new "system variables"
    ANDROID_SDK_HOME=D:\Program Files\android-sdk-windows (select your home directory of android sdk )
  2. modify system variables Path, add "%Android_SDK_HOME%/tools;"

it works!

AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66
3

Test Ubuntu 12.04 & 12.10 & 14.10 & 15.04 & 15.10 & 16.04

Open your terminal (ctrl +t)

sudo su
nautilus

ctrl + h

Search folder .android/avd

Copy this folder /avd

Paste in /home/YouUser/.android/

And problem solved

Dharman
  • 30,962
  • 25
  • 85
  • 135
David Hackro
  • 3,652
  • 6
  • 41
  • 61
2

I was experiencing the same issue, and just resolved it by changing the environment variables from ANDROID_AVD_HOME to $ANDROID_AVD_HOME.

This must have been a change between versions. I had removed all android/appinventor/eclipse programs, SDKs and so on - some manually - in order to get a fresh install and wound up with this error.

  • 1
    Actually, that's just a bug in your code: ANDROID_AVD_HOME is the name of the environment variable; when you want to reference the value of that variable, then you type $ANDROID_ADV_HOIME. Basic BASH scripting. – JESii Feb 23 '16 at 00:21
1
  1. Delete /home/username/.android: $ sudo rm -r .android
  2. Make a link $ sudo ln -s /root/.android ./.android