Could anybody post a working solution for doing this in the terminal?
ANDROID_HOME
is usually a directory like .android
. Its where things like the Debug Key will be stored.
export ANDROID_HOME=~/.android
You can automate it for your login. Just add it to your .bash_profile
(below is from my OS X 10.8.5 machine):
$ cat ~/.bash_profile
# MacPorts Installer addition on 2012-07-19 at 20:21:05
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Android
export ANDROID_NDK_ROOT=/opt/android-ndk-r9
export ANDROID_SDK_ROOT=/opt/android-sdk
export JAVA_HOME=`/usr/libexec/java_home`
export ANDROID_HOME=~/.android
export PATH="$ANDROID_SDK_ROOT/tools/":"$ANDROID_SDK_ROOT/platform-tools/":"$PATH"
According to David Turner on the NDK Mailing List, both ANDROID_NDK_ROOT
and ANDROID_SDK_ROOT
need to be set because other tools depend on those values (see Recommended NDK Directory?).
After modifying ~/.bash_profile
, then perform the following (or logoff and back on):
source ~/.bash_profile