Environment variables missing maybe?
Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk
folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk
as well, which is a location pretty much used on CI mostly.
Add the following either on the .zshrc
file. ( or .bash_profile
on iTerm )
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
On the terminal
➜ ~ source .zshrc
It outputs
➜ ~ sdkmanager --version
26.1.1
See https://developer.android.com/studio/command-line/variables