adb command not found
程序员文章站
2024-02-11 09:00:40
...
问题的根源是adb在sdk/platform-tools或者sdktools文件中,没有在shell的配置文件中添加相应的环境变量
使用bash
报错内容 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
......
可能PATH已经存在,在原来基础上添加即可,注意每项之间用 :
隔开
使用zsh或oh-my-zsh
报错内容 zsh: command not found adb:adb
解决办法 (.zshrc是zsh的配置文件,相当于bash的.bash_profile,添加相应的环境变量即可)
1、 vim ~/.zshrc
,如果.zshrc不存在,先touch ~/.zshrc
2、将如下内容添加到.zshrc文件中
......
ANDROID_HOME=/Users/edmond/Library/Android/sdk
PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH:.
export PATH
......
可能PATH已经存在,在原来基础上添加即可,注意每项之间用 :
隔开
推荐阅读
-
adb command not found
-
adb command not found
-
adb error: more than one device/emulator
-
0829 解决adb调试报错error:device not found
-
error: device unauthorized.This adb server's $ADB_VENDOR_KEYS is not set
-
adb: command not found
-
error: device unauthorized. This adb server‘s $ADB_VENDOR_KEYS is not set Try ‘adb kill-server‘
-
error: device unauthorized.This adb server's $ADB_VENDOR_KEYS is not set 问题的解决
-
mysql自带的command line client中创建表的时候,遇到int+数字的
-
ActivityNotFoundException: No Activity found to handle Intent