I have installed Android Studio on my MacBook Air (OS Version 10.11 El Capitan) and have successfully written a small "hello, world" app and installed on device (Nexus 7) and ran on AVD. All I want to do now is be able to build the app and install it on device from the command line as opposed to Android Studio. I'm following the directions here:
http://developer.android.com/training/basics/firstapp/running-app.html
and the relevant line is:
Make sure the Android SDK platform-tools/ directory is included in your PATH environment variable, then execute:
The problem is I can't find the Android SDK on my machine! I assume it's there because otherwise the program wouldn't compile and run through Android Studio? Perhaps that's a bad assumption? I'm new to Macs (I'm used to Windows) so I don't know the best way to search for the Android SDK. So my questions:
sdk
You can see the location there – most of the time it is:
/Users/<name>/Library/Android/sdk
Open your Terminal edit your ~/.bash_profile
file in nano by typing:
nano ~/.bash_profile
If you use Zsh, edit ~/.zshrc
instead.
Go to the end of the file and add the directory path to your $PATH
:
export PATH="${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools:${PATH}"
Ctrl+X
adb
) and verify it is opened/executed