一、下載安裝android studio & sdk
我的另外一篇文章:Mac下安裝Android studio、sdk以及配置其環境變量詳細步驟 https://blog.csdn.net/qq_37941471/article/details/101446940
二、手機上下載安裝最新的solopi包
https://github.com/alipay/SoloPi/releases
三、solopi的初始配置
https://github.com/alipay/SoloPi/wiki/FirstUse
四、輸入命令連接solopi
電腦與手機直連,終端輸入以下命令:
1. adb devices
2. adb tcpip 5555
如果是以下的展示就表示連接成功:
xujiadeMacBook-Pro:~ xujia$ adb devices
List of devices attached
6HJDU19627002412 device
xujiadeMacBook-Pro:~ xujia$ adb tcpip 5555
restarting in TCP mode port: 5555
五、常見問題
- 已經連接成功,第二次使用時, 輸入abd tcpip 5555,出現:
➜ ~ adb tcpip 5555
zsh: command not found: adb
解決方法:
➜ ~ source ~/.bash_profile
➜ ~ adb tcpip 5555
* daemon not running; starting now at tcp:5037
* daemon started successfully
restarting in TCP mode port: 5555
➜ ~