mac上adb command not found
程序员文章站
2023-12-31 21:42:22
第一种报错(使用的自带mac命令行) 1、vim ~/.bash_profile ,如果.bash_profile不存在,先touch ~/.bash_profile 2、将如下内容添加到.bash_profile文件中 esc = 输入wq! = enter 3、source ~/.bash_pr ......
第一种报错(使用的自带mac命令行)
bash: adb: command not found
1、vim ~/.bash_profile ,如果.bash_profile不存在,先touch ~/.bash_profile
2、将如下内容添加到.bash_profile文件中
...... ANDROID_HOME=/Users/edmond/Library/Android/sdk PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH:. export PATH ......
esc => 输入wq! => enter
3、source ~/.bash_profile 使其生效
第二种报错(使用的是zsh或oh-my-zsh)
zsh: command not found adb:adb
1、vim ~/.zshrc ,如果.zshrc不存在,先touch ~/.zshrc
2、将如下内容添加到.bash_profile文件中
...... ANDROID_HOME=/Users/edmond/Library/Android/sdk PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH:. export PATH ......
esc => 输入wq! => enter
3、source ~/.zshrc 使其生效
ps:.zshrc是zsh的配置文件,相当于bash的.bash_profile,添加相应的环境变量即可
推荐阅读
-
mac上adb command not found
-
mac command not found: adb(mac电脑配置Android环境变量)
-
mac安装appium时执行appium-doctor命令提示command not found: appium-doctor
-
Mac 执行 gulp 报错 -zzh: gulp: command not found
-
mac ls: command not found的问题与解决
-
Mac平台出现brew command not found
-
解决mac安装homebrew后报错-bash: brew: command not found
-
MAC下安装homebrew.(-bash: brew: command not found)
-
iOS-解决mac安装homebrew后报错-bash: brew: command not found
-
mac下node.js 安装express后报express command not found