Dave Dave - 10 months ago 51
Android Question

Finding Android SDK on Mac and adding to PATH

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:


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:

  1. How do I find Android SDK on my machine? Or prove to myself it's not there?

  2. If it's not there how do I install it?

  3. How do I change PATH to include Android SDK?




1. How to find it

Open Android studio Goto Android Studio>Preference Search for sdk And something similar to this(This is a windows box as you can see) will showSorry Not A MAC Fan

You can see the location there, most of the time it is /Users/<name>/Library/Android/sdk

2. How to Install It,If not there

Just go-to Android Standalone sdk download page and download the zip file for OSX and extract it to a path Stand alone sdk download page

3. How to add it to the path

Open your terminal application and open paths file in nano by typing

sudo nano /etc/paths

Input your password,Go to the end of the lines and input the directory path. And you want to add: eg:-


Nano screenshot

Save it by pressing Ctrl+X, Restart the terminal application and To see if it is working or not - type in the name of any file or binary which are inside the directories that you've added and verify it is opened/executed