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.

Task :@react-native-community_checkbox:compileDebugJavaWithJavac FAILED

See original GitHub issue

Suddenly I have a problem with this library , I don’t know what happened but now it gets me this error when I do: react-native run-android

Task :@react-native-community_checkbox:compileDebugJavaWithJavac FAILED

FULL ERROR

> Configure project :@react-native-community_checkbox
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :@react-native-community_checkbox:compileDebugJavaWithJavac FAILED
9 actionable tasks: 1 executed, 8 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':@react-native-community_checkbox:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_231 contains a valid JDK installation.

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

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

BUILD FAILED in 4s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':@react-native-community_checkbox:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_231 contains a valid JDK installation.

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

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

BUILD FAILED in 4s

My specs:

"@react-native-community/checkbox": "^0.2.1",
"react": "^16.10.2",
"react-native": "^0.61.2",

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

7reactions
BrianHlcncommented, Feb 7, 2020

have you tried with “npx jetify” command? it worked for me

2reactions
muhamadabduhcommented, Feb 14, 2020

have you tried with “npx jetify” command? it worked for me

it worked for me too, but I also edited android/app/build.gradle, my RN version 0.61.5 -implementation "com.facebook.react:react-native:+" change to: + implementation "com.facebook.react:react-native:0.61.5"

Read more comments on GitHub >

github_iconTop Results From Across the Web

react native - Task :app:compileDebugJavaWithJavac FAILED
I've tried looking for a way to solve this error. It's occurring to me while I try to install my app with react-native...
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