question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-native run-android Build failed

See original GitHub issue

react-native run-android Build failed

I configure it as an example,but there’s a mistake I can’t solve:

Terminal error reporting is as follows:: `============================ FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:app:compileDebugJavaWithJavac’.

Could not add entry ‘0’ to cache localClassSetAnalysis.bin (/home/littlestone/Documents/test/android/.gradle/2.14.1/tasks/_app_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin).

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

BUILD FAILED

Total time: 1.389 secs 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/android-setup.html

=======================`

react-native : 0.45 ndoe: v7.10.0 npm :4.2.0

plaese tell me how to handle this case.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

15reactions
fadeli1commented, Jul 11, 2017

try cd android & gradlew clean

1reaction
MrBrownsercommented, Sep 21, 2017

Thanks @therovermind! I ended up doing it natively for both Android and iOS, following an always-wise Spencer Carli post.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Build Failed on React-Native run-android?
You need to add ANDROID_HOME, JAVA_HOME variables in environmental variables and tools and platform-tools in path of system to run android apk.
Read more >
Fails to run react-native run-android (v0.68.0) without yarn
Description when I create a test project and enable new architecture and Hermes it's giving me this type error below:- NOTE:- I KNOW...
Read more >
React Native Android : FAILURE: Build failed with ... - A Shirazee
This is an issue with how Gradle is automating the build and the current version of the JDK installed on your machine, follow...
Read more >
Addressing common errors in React Native - LogRocket Blog
Failed to install the app · Open your React Native application in a text editor like VS Code · In the application's root...
Read more >
How to fix all build errors in react native(Android specific).
Basically, what this error is trying to tell you is that this particular package does not support the Gradle version you are using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found