简体   繁体   English

“哪个adb”命令显示adb的路径,但“ adb设备”表示没有这样的文件或目录

[英]“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.

相关问题 使用exec()在cmd行中的电子js上执行命令'ADB设备' - Executing command 'ADB devices' on electron js in cmd line using exec() 执行命令“adb devices”Visual Studio 代码时出错 - Error while executing command 'adb devices' visual studio code “adb devices”在 Ubuntu 上返回空的“附加设备列表” - “adb devices” returns empty “List of devices attached” on Ubuntu 通过Javascript或批处理文件的ADB脚本 - ADB Script via Javascript or Batch file 有没有办法从 HTML 页面运行“adb 设备”? - Is there any way to run "adb devices" from HTML page? HTC Android设备上的Javascript console.log()和adb logcat - Javascript console.log() on HTC Android devices and adb logcat 使用 ADB 在 android WEBAPP 上启动 - Launching on android WEBAPP with ADB 开始:意图在真实设备上显示黑屏,我没有收到关于adb logcat的任何错误 - Starting: Intent shows a blank screen on a real device and I do not get any error with adb logcat 自动化测试-Android adb连接到UC浏览器 - Automation Test - Android adb connect to UC browser 使用Apache Cordova进行编程时,如何使用ADB显示javascript错误? - How to use ADB to show javascript errors when programming with Apache Cordova?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM