Could not find INI file in $ANDROID_AVD_HOME nor in $HOME/.android/avd

萝らか妹 提交于 2019-11-30 02:56:32

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

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

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.

Paulo Alfaiate

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/

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

Hrvoje

Or instead ANDROID_AVD_HOME enter ANDROID_SDK_HOME and Studio will work: Cannot start avd emulator on android studio 1.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.

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!