无法在Mac上运行/打开Android Studio应用程序和Android模拟器

时间:2018-01-08 00:58:23

标签: android macos android-studio-3.0

我已经尝试删除配置文件并重新安装android studio。打开/运行ide仍然有问题。我尝试使用终端以管理员身份运行它:

cd /Applications/Android\ Studio.app/Contents/MacOS/
sudo ./studio

我设法打开了它。但无法在模拟器或任何东西上运行它。我设法打开了sdk工具。但是当我尝试运行模拟器时,这就是我得到的:

9:36 AM Emulator: WARNING: Unknown AVD name [7.0_API_22], use -list-avds to see valid list.

9:36 AM Emulator: HOME is defined but there is no file 7.0_API_22.ini in $HOME/.android/avd

9:36 AM Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)

9:36 AM Emulator: WARNING: Unknown AVD name [7.0_API_22], use -list-avds to see valid list.

9:36 AM Emulator: HOME is defined but there is no file 7.0_API_22.ini in $HOME/.android/avd

9:36 AM Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)

9:36 AM Emulator: WARNING: Unknown AVD name [7.0_API_22], use -list-avds to see valid list.

9:36 AM Emulator: HOME is defined but there is no file 7.0_API_22.ini in $HOME/.android/avd

9:36 AM Emulator: (Note: Directories are searched in the order $ANDROID_AVD_HOME, $ANDROID_SDK_HOME/avd and $HOME/.android/avd)

9:36 AM Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

9:36 AM Emulator: Process finished with exit code 1

请帮帮我。我之前使用过它,我可以轻松打开它并运行它,而不需要每次我尝试打开它时都使用终端。我甚至可以打开模拟器。仅供参考,我使用 mac OSX版本10.11.6

2 个答案:

答案 0 :(得分:0)

磁盘上确实存在日志中缺少的文件吗?

$ HOME / .android / avd

中的文件7.0_API_22.ini

答案 1 :(得分:0)

我终于让它运行了。我做了Simon说。我删除了mac中的所有android文件,组件。然后我重新安装它。 在安装过程中,我选择了自定义安装,因为它检测到我有一个以前的android sdk,avd文件。删除与之关联的文件。

我必须再次安装sdk,avd ...但至少我让它运行而不必每次打开android studio时调用终端。可能不是最好的解决方案,(因为我必须重新安装所有的东西),但它会做。