1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 解决Mac 命令行报 “zsh: command not found: adb”

解决Mac 命令行报 “zsh: command not found: adb”

时间:2020-09-07 05:04:51

相关推荐

解决Mac 命令行报 “zsh: command not found: adb”

好好地adb突然用不了了。。。报zsh: command not found: adb,可能是前几天配置ndk的环境变量引起的,网上看了很多,都说修改.zshrc文件

解决方案

临时解决方案,每次打开终端,输入以下命令,adb可以正常使用,但是关闭再打开就会失效

source ~/.bash_profile

为了一劳永逸,我们配置.zshrc

1、 输入

open .zshrc

提示The file /Users/xxx/.zshrc does not exist.,那就手动创建一个.zshrc如下命名

touch .zshrc

然后继续

open .zshrc

会看到一个空白的文件,直接将下面这行配置copy进去,或者把你的.bash_profile文件的配置重新copy一份过来也行

source ~/.bash_profile

最后执行

source .zshrc

就配置ok了

输入

adb --version

验证即可!举一反三,要是javac或者其他命令不管用也是同样操作。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。