Making sure ANDROID_HOME is exported and adding the SDK tool directories to PATH should be more than enough to get you going.
Using the terminal
# First, we make sure we have a newline at the end of the .bash_profile echo >> /Users/abdi/.bash_profile # We set the ANDROID_HOME value in the .bash_profile echo "export ANDROID_HOME=/Users/abdi/adt/sdk" >> /Users/abdi/.bash_profile # We alter the PATH value a bit as well echo "export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools" >> /Users/abdi/.bash_profile # We then tell the terminal to update all the things . /Users/abdi/.bash_profile
Using a GUI (mostly)
You can also open the .bash_profile file in TextEdit using the open -e /Users/abdi/.bash_profile command. If you get some errors about missing files, try running touch /Users/abdi/.bash_profile and retry the open command. In the file that opens, add the following lines at the end.
export ANDROID_HOME=/Users/abdi/adt/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Running . /Users/abdi/.bash_profile as in the terminal version after that should get you fully set up.
source ~/.bash_profile
Soucre:http://stackoverflow.com/questions/26701176/error-android-home-is-not-set-and-android-command-not-in-your-path-you-must
浙公网安备 33010602011771号