Hello, I am new to Mac...and trying to set the Android SDK and JDK path...but its not happening...looking for help..

Hello, I am new to Mac…and trying to set the Android SDK and JDK path…but its not happening…looking for help…

@username

Setting the JDK Path on Mac OS X

  • Login and open a Terminal or command
    line window
  • Open the ~/.bash_profile using vi or
    another command-line editor such as
    Pico. For example enter vi
    ~/.bash_profile.
  • Set your PATH to include the JDK
    sub-folder named java. For example:
    export
    PATH=$PATH:/usr/java/jdk1.6.0_10/bin
  • Save the changes and either logout
    and then back in, or, to active the
    new settings enter source
    ~/.bash_profile

Where the Android-SDK is installed depends on how you installed it.

If the SDK was installed automatically as part of Android Studio then it’s located here:

/Users/{YOUR_USER_NAME}/Library/Android/sdk

Once you know the location, open a terminal window and enter the following (changing out the path to the SDK to be however you installed it):

export ANDROID_HOME={YOUR_PATH}

Once you have this set, you need to add this to the PATH environment variable:

export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Lastly apply these changes by re-sourcing .bash_profile

source ~/.bash_profile