Reputation: 3534
I installed Android Studio on my Mac, added the following lines to my .zshrc
file (and then source
d it):
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
export ANDROID_HOME="$HOME/Android/Sdk"
export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
but when I try to execute an emulator command (such as emulator -list-avds
) I get this error:
command not found: emulator
I CAN run adb
, so I know that my path is at least somewhat configured correctly. Thank you!
Upvotes: 0
Views: 4188
Reputation: 3534
Well, I'm an idiot. I didn't have the ANDROID_HOME variable correct. Updating .zshrc
this way will get emulator and adb working:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
export ANDROID_HOME="$HOME/Library/Android/Sdk"
export PATH="$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH"
Upvotes: 3