6

While i run react native android app in visual code i get this error. I need help to resolve this issue. Thanks.

FAILURE: Build failed with an exception.

What went wrong: A problem was found with the configuration of task ':app:installDebug'.

File 'C:\Users\Supun\AppData\Local\Android\Sdk\platform-tools\adb.exe' specified for property 'adbExe' does not exist.

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Get more help at https://help.gradle.org

BUILD FAILED in 4m 34s 26 actionable tasks: 26 executed Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment:

https://facebook.github.io/react-native/docs/getting-started.html
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn cmd.exe ENOENT
    at _errnoException (util.js:1024:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

1 Answer 1

7

I know this is an old topic, but I'll post it here in case if anyone is having the same issue.

For me, this usually happens when WSL is being used, while Android SDK is installed under Windows (there you have adb.exe instead of adb).

Making another copy of adb.exe binary as adb resolved the issue for me:

copy adb.exe adb
Sign up to request clarification or add additional context in comments.

2 Comments

Awesome! You saved hours of troubleshooting for me. It really works
Thank you so much !!! That works ! F*****g windows/ubuntu mix that never work ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.