我遇到的问题是我无法在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_SDK_ROOT和ANDROID_AVD_HOME。
open -a TextEdit ~/.bash_profile
export ANDROID_SDK_ROOT=/Users/{your user}/Library/Android/sdk
export ANDROID_AVD_HOME=/Users/ryadahitdep/.android/avd
3. CMD + S保存您的更改