2

Hi i got this error when i try to run react app on my real android device via : react-native run-android

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to install all 

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

BUILD FAILED
ABDELKHALEK ZELLAT
  • 238
  • 1
  • 3
  • 11

2 Answers2

7

Try these steps.

  1. Delete node modules folder in your project.
  2. Delete build folder in android/build
  3. Close all running terminals.
  4. Make sure you have installed adb drivers in your environment. If not install adb drivers. (For macOS / For Windows)
  5. Open new terminal window and in your project folder run npm install to re-install node modules.
  6. Finally run your app using react-native run-android
Akila Devinda
  • 5,054
  • 3
  • 19
  • 35
0

If you are using Android Studio, make sure you run the emulator before running the commands and the emulator API level matches the targetSdk (build.gradle).

bl00
  • 1