Android AVD 启动错误 [英] Android AVD starting error

查看:24
本文介绍了Android AVD 启动错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

恐慌:HOME 已定义,但在 $HOME/.android/avd 中找不到 Nexus_4_API_21.ini 文件(注意:avd按照$ANDROID_AVD_HOME,$ANDROID_SDK_HOME/.android/avd and $HOME/.android/avd的顺序搜索)

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

推荐答案

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

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

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

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

我重新启动了 Android Studio,模拟器就可以工作了.

I restarted Android Studio and the emulator worked.

这似乎是 Android Studio 安装程序中的一个错误,因为我在安装向导中明确指出了 D: 位置.安装程序应该已经设置了这个变量.

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 AVD 启动错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆