eclipse Android AVD 启动错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28983364/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 22:28:39  来源:igfitidea点击:

Android AVD starting error

androideclipseperformanceandroid-studioandroid-emulator

提问by Gabs Sukumar

I am getting this error when i start an avd in android studio. Any help would be appreciated. And also unable to start android studio except from terminal.

当我在 android studio 中启动 avd 时出现此错误。任何帮助,将不胜感激。并且也无法从终端启动 android studio。

PANIC: HOMEis defined but could not find Nexus_4_API_21.inifile in $HOME/.android/avd(Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME/.android/avd and $HOME/.android/avd)

PANIC:HOME已定义但找不到Nexus_4_API_21.ini文件$HOME/.android/avd(注:avd按 的顺序搜索$ANDROID_AVD_HOME,$ANDROID_SDK_HOME/.android/avd and $HOME/.android/avd

回答by Fuhrmanator

In my case, I had especially installed Android Studio on my D: drive (for space reasons). On my installation, the avddirectory was located in D:\MyInstall\.android\.avd

就我而言,我特别在 D: 驱动器上安装了 Android Studio(出于空间原因)。在我的安装中,该avd目录位于D:\MyInstall\.android\.avd

The solution for me was to define a Windows environment variable (user variable)with Variable name: ANDROID_SDK_HOMEand Variable value: D:\MyInstall

我的解决方案是定义一个 Windows 环境变量(用户变量),变量名:ANDROID_SDK_HOME和变量值:D:\MyInstall

I restarted Android Studio and the emulator worked.

我重新启动了 Android Studio 并且模拟器工作了。

This appears to be a bug in the Android Studio installer, since I explicitly stated the D: location in the install wizard. The installer should probably have set this variable.

这似乎是 Android Studio 安装程序中的一个错误,因为我在安装向导中明确说明了 D: 位置。安装程序可能已经设置了这个变量。

回答by Exception

Set the variable ANDROID_SDK_HOME to < home directory > / .android / .avd

将变量 ANDROID_SDK_HOME 设置为 <home directory>/.android/.avd

For creating this variable under Win7, please go to control panel -> system -> advanced parameters -> environment variables. In the "user variables" block, Click on "new". Please fill the variable name and its value. Close all dialog by clickin on button "OK" and launch android studio.

在Win7下创建这个变量,请到控制面板->系统->高级参数->环境变量。在“用户变量”块中,单击“新建”。请填写变量名称及其值。单击“确定”按钮关闭所有对话框并启动 android studio。

Go through this linkfor more solutions if the above one doesn't work out for you.

如果上述方法不适合您,请访问此链接以获取更多解决方案。

回答by Mayank

I also came across to the same problem while launching Android emulator launch.

我在启动 Android 模拟器启动时也遇到了同样的问题。

PANIC: HOME is defined but could not find testAvd.inifile in $HOME\.android\avd

PANIC:HOME 已定义,但testAvd.ini在其中找不到文件$HOME\.android\avd

(Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME\.android\avd and $HOME\.android\avd)

There are two solutions I found for the above problem. Goto runand type regeditfor windows and check the path set in the registry variables in under

针对上述问题,我找到了两种解决方案。转到run并键入regeditwindows 并检查下注册表变量中设置的路径

HKEY_LOCAL_MACHINE->Android Studio

And check the .android\avdreferring to the location of your testAvd.inilocation. If not, either correct it or put your inifile at the UserSettingsPathpresent in your disc location.

并检查.android\avd参考您testAvd.ini所在位置的位置。如果没有,请更正它或将您的ini文件放在UserSettingsPath当前光盘位置。

回答by Kalpa Gunarathna

This solved the problem for me. Just follow the link. It explains why it happens and how to get around it. :) http://kalpa-gunarathna.blogspot.com/2015/04/android-emulator-not-starting-on-ubuntu.html

这为我解决了这个问题。只需点击链接即可。它解释了它发生的原因以及如何解决它。:) http://kalpa-gunarathna.blogspot.com/2015/04/android-emulator-not-starting-on-ubuntu.html