[英]“which adb” command shows the path of adb but “adb devices” says no such file or directory
I'm practicing REACT NATIVE on UBUNTU 18.x OS, everything was running smooth, yesterday i updated my React native,react & android gradle versions then i recived some error like server adb & client adb doesn't match, i fixed this issue using some commands now once the new project run fine, but as soon as i rebooted my system & run the project,it thrown the error 我正在UBUNTU 18.x OS上练习REACT NATIVE,一切运行顺利,昨天我更新了我的React native,react和android gradle版本,然后我收到了一些错误,例如服务器adb和客户端adb不匹配,我解决了这个问题新项目正常运行后,立即使用一些命令,但是一旦我重新启动系统并运行该项目,它就会引发错误
then i checked adb 然后我检查了亚行
+adb
output:bash: /usr/bin/adb: No such file or directory 输出:bash:/ usr / bin / adb:没有这样的文件或目录
+which adb
output:/usr/bin/adb 输出:在/ usr / bin中/ ADB
+type adb
output:adb is hashed (/usr/bin/adb) 输出:adb被散列(/ usr / bin / adb)
+adb devices
output:bash: /usr/bin/adb: No such file or directory 输出:bash:/ usr / bin / adb:没有这样的文件或目录
please help me to resolve this error! 请帮助我解决此错误!
To my knowledge it can be resolved by increasing the num of max users in sysctl.conf on UBUNTU you can run 据我所知,可以通过在UBUNTU上的sysctl.conf中增加最大用户数来解决此问题
sudo nano /etc/sysctl.conf
then press ctrl+O then press ENTRE then take the cursor on the end of file and place this line there 然后按ctrl + O,然后按ENTRE,然后将光标移到文件末尾并将此行放置在此处
fs.inotify.max_user_watches=100000
or simply run this command 或只是运行此命令
sudo sysctl -w fs.inotify.max_user_watches=100000
you can also follow this no-command-adb-found-error-on-ubuntu 您也可以在Ubuntu上遵循此no-command-adb-found-error
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.