Android - Command not found Android - Command not found android android

Android - Command not found


On MacOS/Linux, define the path to wherever you installed your SDK as ANDROID_HOME:

MacOS

$ export ANDROID_HOME=/Applications/android-sdk-macosx

If you installed Android Studio, the value will need to be

export ANDROID_HOME=$HOME/Library/Android/sdk

Linux

$ export ANDROID_HOME=~/android-sdk-linux

Then add the paths to the platform-tools and tools sub-directories (Same on MacOS/Linux).

export PATH=$ANDROID_HOME/tools:$PATHexport PATH=$ANDROID_HOME/platform-tools:$PATH

You should now be able to run android from the shell.

If none of the suggested ANDROID_HOME paths above are valid, you can find the (uniquely and consistently named) platform-tools folder via:

find / -name platform-tools 2>/dev/null

Whatever path that returns will need to be trimmed down to end with either sdk, android-sdk-linux, or android-sdk-macosx.


Another possibility is simply that your "android" file is not executable. Navigate to the tools path in terminal and then make it executable by:
chmod 777 android
Then you can run:
./android sdk
It's what worked for me.


Assuming that you have set ANDROID_HOME to point to the sdk install, you should add $ANDROID_HOME/tools and $ANDROID_HOME/platform-tools to your PATH.