Error when trying to use react native geolocation in gradle "apparently"

75 views Asked by At

This is the error that appears when I run npm run android, just to make it clear that I am using the react native CLI.

Failed to install the app.
Command failed with exit code 1: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
 * What went wrong: Execution failed for task ':react-native-community_geolocation:compileDebugJavaWithJavac'.
 > Could not resolve all files for configuration ':react-native-community_geolocation:androidJdkImage'.
 > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
 > Execution failed for JdkImageTransform: C:\Users\eduardo\AppData\Local\Android\Sdk\platforms\android-34\core-for-system-modules.jar.
 > Error while executing process C:\Program Files\Java\jdk-21\bin\jlink.exe with arguments {--module-path C:\Users\eduardo\.gradle\caches\transforms-3\39249073bb6a3501d7fccc77a4a99ba2\transformed\output\temp\jmod --add-modules java.base --output C:\Users\eduardo\.gradle\caches\transforms-3\39249073bb6a3501d7fccc77a4a99ba2\transformed\output\jdkImage --disable-plugin system-modules} * 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 1m 29s.

I'm trying to use this library within my project but every time I run npm run android in the terminal this error appears, apparently gradle is giving an error, but I don't know how to fix it.

0

There are 0 answers