Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :@react-native-community_checkbox:compileDebugJavaWithJavac FAILED #27

Closed
ghost opened this issue Nov 27, 2019 · 5 comments
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Nov 27, 2019

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",
@nicholaslee119 nicholaslee119 self-assigned this Dec 2, 2019
@rahul2992
Copy link

Any update on this? I am getting the same error. Thank you

@ghost
Copy link
Author

ghost commented Feb 4, 2020

Any update on this? I am getting the same error. Thank you

I'm still with the same problem...

@Naturalclar
Copy link
Collaborator

Naturalclar commented Feb 4, 2020

@BravenxX
Have you tried reinstalling the jdk?
There seems to be similar issues (like facebook/react-native#16844) around and that seems to be the way people solve this particular error.

@BrianHlcn
Copy link

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

@muhamadabduh
Copy link

muhamadabduh commented 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"

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants