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

Android build failing #11

Open
andrisole92 opened this issue Feb 23, 2024 · 1 comment
Open

Android build failing #11

andrisole92 opened this issue Feb 23, 2024 · 1 comment

Comments

@andrisole92
Copy link

Failing:

[RUN_GRADLEW] FAILURE:
[RUN_GRADLEW] Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Could not determine the dependencies of task ':react-native-face-detection:bundleLibCompileToJarDebug'.
[RUN_GRADLEW] > Could not create task ':react-native-face-detection:compileDebugJavaWithJavac'.
[RUN_GRADLEW] > In order to compile Java 9+ source, please set compileSdkVersion to 30 or above
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 34s

@MuazzezA
Copy link

MuazzezA commented May 13, 2024

@andrisole92 Go into the package from node modules and edit the versions in android > build.gradle according to your own project.

example diff

--- a/node_modules/react-native-face-detection/android/build.gradle
+++ b/node_modules/react-native-face-detection/android/build.gradle
 
 android {
-    compileSdkVersion safeExtGet('FaceDetection_compileSdkVersion', 29)
-    buildToolsVersion safeExtGet('FaceDetection_buildToolsVersion', '29.0.2')
+    compileSdkVersion safeExtGet('FaceDetection_compileSdkVersion', 34)
+    buildToolsVersion safeExtGet('FaceDetection_buildToolsVersion', '34.0.0')
     defaultConfig {
-        minSdkVersion safeExtGet('FaceDetection_minSdkVersion', 16)
-        targetSdkVersion safeExtGet('FaceDetection_targetSdkVersion', 29)
+        minSdkVersion safeExtGet('FaceDetection_minSdkVersion', 26)
+        targetSdkVersion safeExtGet('FaceDetection_targetSdkVersion', 34)
         versionCode 1
         versionName "1.0"

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

No branches or pull requests

2 participants