Hi -
I cannot figure out how to fix this in the latest version of Android Studio:
What went wrong:
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/ulrichsinn/Library/Android/sdk/platforms/android-34/core-for-system-modules.jar.
Vanilla project is fine. Happens after adding shared_preferences.
Thank you for your help!
UJ.
If somebody else needs it, the answer is here:
opened 05:40AM - 07 Oct 24 UTC
closed 07:06PM - 18 Oct 24 UTC
tool
a: build
P1
r: fixed
a: plugins
team-android
### Steps to reproduce
I am running on Mac mini
OS version: 15.0.1
Android S… tudio (version 2024.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
### Actual results
Not able to build. The error is occurred !
### Logs
<details open>
<summary>Logs</summary>
```
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}
```
</details>
### Flutter Doctor output
<details open>
<summary>Doctor output</summary>
```
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0.1 24A348 darwin-arm64, locale
en-US)
• Flutter version 3.24.3 on channel stable at
/Users/sicunetappdeveloper/Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2663184aa7 (4 weeks ago), 2024-09-11 16:27:48 -0500
• Engine revision 36335019a8
• Dart version 3.5.3
• DevTools version 2.37.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/sicunetappdeveloper/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 16A242d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)
[✓] Connected device (4 available)
• Android SDK built for arm64 (mobile) • emulator-5554 •
android-arm64 • Android 11 (API 30) (emulator)
• macOS (desktop) • macos •
darwin-arm64 • macOS 15.0.1 24A348 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin
• macOS 15.0.1 24A348 darwin-arm64
• Chrome (web) • chrome •
web-javascript • Google Chrome 129.0.6668.90
[✓] Network resources
• All expected network resources are available.
• No issues found!
```
</details>
Hello,
Thanks for this info. Your Texas Benefits Login
Best Regards
I’m using vscode, and when I opened the project from this chapter same issue, occured to me, how to resolve this?