Configuring JDK,SDK,NDK and ADB environment variables under MAC

Source: Internet
Author: User

Mac do Andoird development, jdk,ndk,sdk,adb,tomcat,maven and other necessary tools, and the configuration path path, and win slightly different, but also very easy things. Step simple violence.

1. Start Terminal terminal

No? control+ Space key search terminal or terminal

2. Edit the. bash_profile file

In the terminal input command:

-e .bash_profile

Depending on the path where you installed Jdk,ndk,sdk,adb, write the. bash_profile file with the following contents:

ExportJava_home=/library/Java/Javavirtualmachines/jdk1.8.0_92. jdk/Contents/HomeExportPATH=$JAVA _home/Bin:$PATHExportCLASSPATH=.:$JAVA _home/lib/dt.jar:$JAVA _home/lib/tools.jarexportPATH=${PATH}:/users/duqian/library/android/sdk/platform-toolsExportAndroid_ndk_home=/users/duqian/library/Android/sdk/ndk-bundleexportPATH=${PATH}:${Android_ndk_home}exportAndroid_ndk_home

If you do not have a. bash_profile file, enter the current user's home directory to create a. bash_profile file, and this step is self-validating.

cd ~touch .bash_profile

Go back to step two to add path.

3. Save and close
command+S保存
4. Update the environment variables just configured

Enter the following command:

source .bash_profile
5. Test command

javacthe input appears as follows: Success!

Usage: Javac the possible options include:-G
Generate all debug information-g:none does not generate any debug information
-g:{lines,vars,source} generates only certain debug information-nowarn does not generate any warning-verbose output messages about the actions the compiler is performing

Input ndk-build , the following prompt is successful!

notdirectory !    thevariabletotoit.    /Users/duqian/Library/Android/sdk/ndk-bundle/build/core/build-local.mk:151

adbthe input appears as follows: Success!

Debug1.0.3209a0d98bebce-android
6, summary

Follow the steps to do so.
Welcome to Exchange, Du Hu, Dusan,q 291902259.

Configuring JDK,SDK,NDK and ADB environment variables under MAC

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.