1、打開mac的terminal終端,輸入 cd ~/
2、輸入 touch .bash_profile
如果提示 command not found
輸入export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin 回車,繼續下一
3、輸入 open .bash_profile
在最后寫入如下代碼:
export PATH=${PATH}:/Users/apple/Library/Android/sdk/platform-tools
export PATH=${PATH}:/Users/apple/Library/Android/sdk/tools
可根據SDK的安裝目錄進行修改
4、保存,在終端中輸入 source .bash_profile
5、輸入 adb 【驗證是否完成配置,如果不顯示 adb: command not found,說明配置完成 】