1、前提
- 安装好JDK
- 安装brew
2、brew安装
brew install android-sdkbrew install android-platform-tools
检查是否安装成功
android
3、配置sdk
brew list android-sdk
进入配置文件
sudo vim ~/.zshrc
配置
export ANDROID_HOME=/usr/local/Caskroom/android-sdkexport PATH=$PATH:$ANDROID_HOME/toolsexport PATH=$PATH:$ANDROID_HOME/platform-tools
使配置生效
source ~/.zshrc
检查sdk是否配置成功
adb version
来源地址:https://blog.csdn.net/OnlyoneFrist/article/details/132039089