0
votes

I am using Homebrew to install Android dev tools

brew install gradle
brew install android-sdk

Then I am getting command not found when running avdmanager.

➜  ~ avdmanager
zsh: command not found: avdmanager

How to open the AVD manager on OSX from the command line?

1

1 Answers

0
votes

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