[Solved] Execution failed for task ':shared_preferences_android:compileDebugJavaWithJavac'.

Pubblicato il: 25 ottobre 2024
sul canale di: IntelliLogics
12,175
211

if you are facing the below error
Execution failed for task ':shared_preferences_android:compileDebugJavaWithJavac'.
Could not resolve all files for configuration ':shared_preferences_android: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: /Users/sicunetappdeveloper/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
Error while executing process /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/jlink with arguments {--module-path /Users/sicunetappdeveloper/.gradle/caches/transforms-3/d9e926982c2c139ff9125eb7b6be4144/transformed/output/temp/jmod --add-modules java.base --output /Users/sicunetappdeveloper/.gradle/caches/transforms-3/d9e926982c2c139ff9125eb7b6be4144/transformed/output/jdkImage --disable-plugin system-modules}

this video will solve the issue.

Follow the steps mentioned below

In the app\build.gradle: make the following changes

android {
ndkVersion "25.1.8937393"

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = 17
}

In the settings.gradle file

id "com.android.application" version "8.3.2" apply false
id "org.jetbrains.kotlin.android" version "2.0.20" apply false

And this in gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip


In questa pagina del sito puoi guardare il video online [Solved] Execution failed for task ':shared_preferences_android:compileDebugJavaWithJavac'. della durata di ore minuti seconda in buona qualità , che l'utente ha caricato IntelliLogics 25 ottobre 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 12,175 volte e gli è piaciuto 211 spettatori. Buona visione!