profile
viewpoint

Ask questions/bin/sh: 1: adb: not found on Linux

Actual Behavior

  1. Select "React native: Run Android on device/emulator" or "Debug Android".
  2. Get error "adb not found".

Expected Behavior

  1. Select "React native: Run Android on device/emulator"
  2. Run app on android device/emulator

Software versions

  • React-Native VS Code extension version: 0.6.11
  • VSCode version: 1.24.0
  • OS platform and version: linux x64
  • NodeJS version: 10.4.0
  • React Native version: 0.55.4

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
OS: linux x64
Adapter node: v7.9.0 x64
vscode-chrome-debug-core: 3.17.3
Could not debug. Error while executing command 'adb devices': Command failed: adb devices
/bin/sh: 1: adb: not found
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
Stack: Error: Failed to run the application in Android: Error while executing command 'adb devices': Command failed: adb devices
/bin/sh: 1: adb: not found

	at Function.getWrappedError (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/src/common/error/internalError.js:35:16)
	at Function.wrapError (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/src/common/error/errorHelper.js:18:44)
	at resultOfCode.done.reason (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/src/common/entryPointHandler.js:40:72)
	at _rejected (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:844:24)
	at /path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:870:30
	at Promise.when (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:1122:31)
	at Promise.promise.promiseDispatch (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:788:41)
	at /path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:604:44
	at runSingle (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:137:13)
	at flush (/path/.vscode/extensions/vsmobile.vscode-react-native-0.6.11/node_modules/q/q.js:125:13)
	at _combinedTickCallback (internal/process/next_tick.js:73:7)
	at process._tickCallback (internal/process/next_tick.js:104:9)

I know that there are a few issues like this, but I have all environment paths, in terminal works fine all commands like adb devices.

microsoft/vscode-react-native

Answer questions detroit007

Hello! @ruslan-bikkinin My issue is: /bin/sh: 1: adb: not found info Connecting to the development server... warn Failed to connect to development server using "adb reverse": spawnSync adb ENOENT Could'nt solve this issue by this method is there any other way to solve this my path is :

" /home/hami/.npm-global/bin:/home/hami/.nvm/versions/node/v12.10.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/jdk1.8.0_201/bin:/usr/lib/jvm/jdk1.8.0_201/db/bin:/usr/lib/jvm/jdk1.8.0_201/jre/bin:/snap/bin:/home/hami/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin:/home/hami/Android/Sdk/emulator:/home/hami/Android/Sdk/tools:/home/hami/Android/Sdk/tools/bin:/home/hami/Android/Sdk/platform-tools "

useful!

Related questions

Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 4
Error while executing command 'react-native run-ios --simulator --no-packager' hot 2
Cannot read property 'getCurrentUserAsync' of undefined hot 1
Expo app doesn't connect to packager hot 1
Current workspace does not contain React Native projects hot 1
Could not debug - error code 604 hot 1
Current workspace does not contain React Native projects hot 1
[Bug][Expo] XDLError: packagerPort must be an integer - vscode-react-native hot 1
Version 0.13 breaks running packager from VS Code from different folder hot 1
Error while executing command 'react-native.cmd run-android --no-packager': Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 1
Starting React packager from VSCode fails hot 1
Can't attach packager for debugging hot 1
Cannot bind listener: operation not permitted hot 1
Not all success patterns were matched. (error code 712) hot 1
Current workspace does not contain React Native projects hot 1
Github User Rank List