1、安裝 Homebrew,
$/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh
命令輸入后出現報錯:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused,注意這里問題后綴是Connection refused
前言: Homebrew是Mac上非常優秀的軟件包管理工具,擁有安裝、卸載、更新、查看、搜索等很多實用的功能。
解決辦法:
(1)打開網站: https://www.ipaddress.com/,查詢 raw.githubusercontent.com對應的IP 地址
(2)ping下ip:
(3)使用switchhost或命令行修改系統的host文件
命令行安裝:$sudo vi /etc/hosts
新增:
#安裝Homebrew
185.199.108.133 raw.githubusercontent.com
(4)執行安裝Homebrew命令:
$/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)
2、 安裝adb及測試adb
$brew install android-platform-tools
$adb devices
3、查看adb安裝的位置
$ brew info android-sdk