问题
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:
回答1:
You'll just have to set the ANDROID_AVD_HOME environment variable and restart Android Studio.
回答2:
just this command worked for me : sudo cp -R /root/.android $HOME
回答3:
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.
回答4:
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/
回答5:
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
回答6:
Or instead ANDROID_AVD_HOME enter ANDROID_SDK_HOME and Studio will work: Cannot start avd emulator on android studio 1.0
回答7:
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.
回答8:
because android SDK environment ANDROID_SDK_HOME, wrong path. /usr/local/opt/android-sdk or /Users/[userName]/Library/Android/sdk TRUE
回答9:
Try changing the environment variable definition from ANDROID_AVD_HOME
to $ANDROID_AVD_HOME
.
来源:https://stackoverflow.com/questions/27537578/could-not-find-ini-file-in-android-avd-home-nor-in-home-android-avd