Asmat ullah
Asmat ullah

Reputation: 711

"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

then i checked adb

+adb

output:bash: /usr/bin/adb: No such file or directory

+which adb

output:/usr/bin/adb

+type adb

output:adb is hashed (/usr/bin/adb)

+adb devices

output:bash: /usr/bin/adb: No such file or directory

enter image description here

please help me to resolve this error!

Upvotes: 3

Views: 975

Answers (1)

Haseeb Warriach
Haseeb Warriach

Reputation: 352

To my knowledge it can be resolved by increasing the num of max users in sysctl.conf on UBUNTU you can run

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

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

Upvotes: 5

Related Questions