macOS下已經配置好Android開發環境,環境變量也添加了,但是在終端中使用adb命令每次都需要source .bash_profile之后才能識別,
否則就提示 zsh: command not found: adb
解決方案:
1、查看根目錄下是否有.zshrc文件,如果沒有就新建一個 touch .zshrc
2、打開這個文件 open -e .zshrc
3、在后面添加
1、查看根目錄下是否有.zshrc文件,如果沒有就新建一個 touch .zshrc
2、打開這個文件 open -e .zshrc
3、在后面添加
# Enable my profile
source ~/.bash_profile
4、保存
5、輸入source .bash_profile,是配置生效
source ~/.bash_profile
4、保存
5、輸入source .bash_profile,是配置生效
然后就可以愉快的使用adb命令了。
