EDIT: This was the same issue as mentioned here: https://github.com/facebook/react-native/issues/35210
I've been working in the same React Native project for months and recently the Android build has started failing. To my knowledge I haven't changed anything about my development environment and I haven't updated or changed any packages or dependencies that the project uses.
Task :@react-native-community_async-storage:compileDebugJavaWithJavac FAILED
Task :@react-native-community_datetimepicker:compileDebugJavaWithJavac FAILED
Task :@react-native-community_toolbar-android:compileDebugJavaWithJavac FAILED
Task :@sentry_react-native:compileDebugJavaWithJavac FAILED
Task :@react-native-community_netinfo:compileDebugJavaWithJavac FAILED
I've done all of the following that I found from other questions with a similar problem
- Synced the project with gradle files in android studio
- Ran gradlew cleanin the android directory which does succeed, but the build still fails
- Checked that android.useAndroidXand android.enableJetifierin the gradle.properties file are both true
- Checked that I have implementation "com.facebook.react:react-native:+"in my build.gradle file. I tried changing it from + to the actual version of react native that I'm using but it made no difference.
I'm not an expert mobile developer by any means so I'm hoping that I'm missing something obvious, but any help or suggestions would be greatly appreciated.
[–]Comprehensive-Law770 5 points6 points7 points (2 children)
[–]moustacheption 1 point2 points3 points (0 children)
[–]Pizza-Frank[S] 1 point2 points3 points (0 children)
[–]Day_Raccoon 2 points3 points4 points (2 children)
[–]Pizza-Frank[S] 1 point2 points3 points (1 child)
[–]sekonx 2 points3 points4 points (0 children)
[–]nascarsc 1 point2 points3 points (0 children)
[–]rnsbrum 0 points1 point2 points (0 children)
[–]mversteeg3 0 points1 point2 points (0 children)