MAC:找不到AVD系统路径。请定义ANDROID_SDK_ROOT

问题描述 投票:0回答:1

我遇到的问题是我无法在android studio中启动模拟器。

我收到这些错误:

20:06   Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

20:06   Emulator: Process finished with exit code 1

我读到我需要在vim ~/.bash_profile改变一些东西。我试了但是没用。它目前看起来像这样:

# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH

# added by Anaconda3 5.2.0 installer
export PATH="/Users/jonas/anaconda3/bin:$PATH"
export    JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
export ANDROID_HOME=/usr/local/share/android-sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
export ANDROID_HOME=/usr/local/share/android-sdk
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home
export ANDROID_HOME=/usr/local/share/android-sdk
export ANDROID_SDK_ROOT=/usr/local/share/android-sdk

请注意,我不知道vim ~/.bash_profile做了什么或我改变了它大声笑。

我也试过卸载模拟器和android工作室本身,但它没有用。我可以清理一些东西来完成整个android sdk吗?

顺便说一下,我在Mac上。

任何想法我能做什么?

android android-studio vim android-emulator
1个回答
0
投票

你需要定义你的ANDROID_SDK_ROOT和ANDROID_AVD_HOME。

  1. 打开你的终端并输入open -a TextEdit ~/.bash_profile
  2. 添加此2行并更改当前用户的{您的用户}:

export ANDROID_SDK_ROOT=/Users/{your user}/Library/Android/sdk export ANDROID_AVD_HOME=/Users/ryadahitdep/.android/avd 3. CMD + S保存您的更改

© www.soinside.com 2019 - 2024. All rights reserved.