Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native android adbExe does not exist

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)
like image 519
Supun Abesekara Avatar asked Jun 24 '18 06:06

Supun Abesekara


People also ask

How to run react native app on Android device?

Running your app on Android devices 1 Enable Debugging over USB Most Android devices can only install and run apps downloaded from Google Play, by default. ... 2 Plug in your device via USB Let's now set up an Android device to run our React Native projects. ... 3 Run your app

Why can’t I debug with React Native on Chrome?

This is because synchronous methods require the JS VM to share memory with the app. For the Google Chrome debugger, React Native runs inside the JS VM in Google Chrome, and communicates asynchronously with the mobile devices via WebSockets. Once a native module is written, it needs to be registered with React Native.

Should I use reactcontextbasejavamodule or reactapplicationcontext(RAC)?

However we recommend that you use ReactContextBaseJavaModule, as shown above. ReactContextBaseJavaModule gives access to the ReactApplicationContext (RAC), which is useful for Native Modules that need to hook into activity lifecycle methods.

How do I install React Native on Ubuntu terminal?

Go to the root directory for your project and create a new package.json file with the following contents: Next, make sure you have installed the yarn package manager. Install the react and react-native packages. Open a terminal or command prompt, then navigate to the directory with your package.json file and run:


1 Answers

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
like image 71
nochkin Avatar answered Oct 19 '22 09:10

nochkin