What is the PATH environment variable and how do I set it up to use the Android SDK?

Solution 1:

The PATH environment variable is simply an order list of directories over which (typically) executables are searched for and run. In short, to get you through the setup you'll need to edit /Users/<username/.bash_profile to include

export PATH=$PATH:/Android/android-sdk-mac_x86/tools

This is the most painless way to do that. Note, this assumes that you have the same SDK install path. Modify the text to suit otherwise.

  1. Open up a Terminal window (don't cringe). Use Spotlight ( SPC ) and start typing "terminal". Hit return when you see it highlighted.
  2. Copy and paste the following into the terminal window that opens up and hit enter.

echo 'export PATH=$PATH:/Android/android-sdk-mac_x86/tools' >> ~/.bash_profile

That's it. If you already have a .bash_profile, this will add that line to the end of the file. If you don't already have one, it will create one for you.