给mac配置安卓环境时报错:
brew install android-platform-tools
Warning: No available formula with the name "android-platform-tools".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
It was migrated from homebrew/core to homebrew/cask.
You can access it again by running:brew tap homebrew/cask
And then you can install it by running:brew install --cask android-platform-tools
denghui.he@C02GK1A2MD6M ~ % brew tap homebrew/cask
denghui.he@C02GK1A2MD6M ~ % brew install --cask android-platform-tools
Error: Cask 'android-platform-tools' is unavailable: No Cask with this name exists.
按照提示仍然出现最后一个问题,解决方案如下:
brew install Caskroom/cask/android-platform-tools
或者:
brew install --cask android-platform-tools
安装完成后:将ADB添加到系统环境变量中
export PATH=$PATH:/usr/local/opt/android-platform-tools
重启环境变量,使其生效:
source ~/.bash_profile