[Solved] Execution failed for task ':shared_preferences_android:compileDebugJavaWithJavac'.
HTML-код
- Опубликовано: 26 ноя 2024
- 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
thank you man, you are my hero, i am staked for 2 days, thnks alot ...liked and subscribed
I truly appreciate your kind words! Thank you for liking and subscribing-it means the world to me. Keep up the good work!
Thank you so much for this video, I've been struggling with this error for 2 weeks. Now I manage to solved because of you.
I'm so glad to hear that the video helped you solve the error! It's always a relief to overcome those frustrating tech issues. Keep up the great work!
Thank you very much it was a very helpful video.
Thank you so much for your kind words! I'm thrilled to know that the video made a difference for you!
Thank a lot! You saved me from uninstalling flutter.
How did you know which versions to change?
I'm so glad to hear that! I did some research and found the right versions that worked well together.
Thanks, Solved for me.
Thank you so much for your feedback! I'm happy that the video helped you out!
I've a problem related to it , that's url launcher
Where can I share screenshot with you?
abid93@gmail.com
thanks man that helped
Thank you for watching! I’m really happy that you found it helpful. Your support means a lot!
Still unable build Apk
What errors are you getting?