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
javac
the 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
adb
the 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