Android SDK and Path
The correct configuration in your case would look like this:
export ANDROID_HOME=/opt/android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Note that the environment variable is called ANDROID_HOME
, not ANDROID_SDK_HOME
. Also, the third line in your sample was missing a $
sign (and contained an additional space). Lastly, there is no need to repeat the same path (DRY) - just use the already defined variable.
EDIT (2020-03-08):
While the ANDROID_SDK
environment variable still continues to work for the most part, it has been deprecated by Google, and replaced with ANDROID_SDK_ROOT
. So you might want to use the new name for a new setup.
More details: https://developer.android.com/studio/command-line/variables