android: command not found

Mark Korzhov picture Mark Korzhov · Sep 6, 2014 · Viewed 28.5k times · Source

I tried to make a .jar file from a cloned project:

android update project -p .

but got the error:

android: command not found

I tried to set path to Android SDK, but it didn't help:

export ANDROID_HOME=D:\java\android-sdk
export PATH=$ANDROID_HOME\tools:$PATH
export PATH=$ANDROID_HOME\platform-tools:$PATH

Is it possible to solve this problem?

UPD: I'm using Git Shell from this software: http://git-scm.com/download/win

Answer

Ivan V picture Ivan V · Jul 6, 2015

Finding-android-sdk-on-mac-and-adding-to-path Finding Android SDK on Mac and adding to PATH

To fix

android: command not found error

follow two easy steps (Linux and Mac):

1) Export your Android Sdk path to the ANDROID_HOME variable

$ export ANDROID_HOME=~/Android/Sdk

(change "~" to "$HOME" on Mac)

2) Export Sdk tools path to the PATH variable

$ export PATH=$ANDROID_HOME/tools:$PATH

That's it! run

android

command again to make sure it works properly.