adb 和Android SDK在Mac下的環境整理
1、使用Android studio 下載安裝SDK 需要配置環境變數
open .bash_profile
export ANDROID_HOME=/Users/使用者名稱/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
2、只下載SDK
按照上面的設定環境變數
3、利用brew 下載adb
brew cask install android-platform-tools
Mac系統下Java環境變數
PATH後面加${PATH}
# Setting PATH for Python 3.6
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
export PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
export CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=${PATH}:$JAVA_HOME/bin:$PATH
export ANDROID_HOME=/Users/xiaoyezi/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/tools
export PATH=${PATH}:${ANDROID_HOME}/platform-tools
export APPIUM_HOME=/Applications/Appium.app/Contents/Resources
export JAVA_HOME
export PATH
export CLASSPATH