# Flutter Apprentice: 08-routes-and-navigation : shared\_preferences

**URL:** <https://forums.kodeco.com/t/flutter-apprentice-08-routes-and-navigation-shared-preferences/207004>\
**Category:** Flutter\
**Created:** [October 25, 2024, 11:54pm UTC](https://forums.kodeco.com/t/flutter-apprentice-08-routes-and-navigation-shared-preferences/207004 "2024-10-25T23:54:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uli\_sinn](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/uli_sinn/32/110937_2.png) [@uli\_sinn](https://forums.kodeco.com/u/uli_sinn)\
**Post date:** [October 25, 2024, 11:54pm UTC](https://forums.kodeco.com/t/flutter-apprentice-08-routes-and-navigation-shared-preferences/207004/1 "2024-10-25T23:54:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![uli\_sinn](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/uli_sinn/32/110937_2.png) [@uli\_sinn](https://forums.kodeco.com/u/uli_sinn)\
**Post date:** [October 29, 2024, 1:16am UTC](https://forums.kodeco.com/t/flutter-apprentice-08-routes-and-navigation-shared-preferences/207004/2 "2024-10-29T01:16:13Z")

</div>

If somebody else needs it, the answer is here:

> <https://github.com/flutter/flutter/issues/156304#issuecomment-2420127400>
>
> \### 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\>

---

<div class="post-metadata">

**Author:** ![katty867](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@katty867](https://forums.kodeco.com/u/katty867)\
**Post date:** [October 30, 2024, 5:49am UTC](https://forums.kodeco.com/t/flutter-apprentice-08-routes-and-navigation-shared-preferences/207004/3 "2024-10-30T05:49:14Z")

</div>

Hello,  
Thanks for this info. [Your Texas Benefits Login](https://www.yourtexas-benefits.com)  
Best Regards

---

<div class="post-metadata">

**Author:** ![sowbanmohd](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@sowbanmohd](https://forums.kodeco.com/u/sowbanmohd)\
**Post date:** [November 19, 2024, 7:26am UTC](https://forums.kodeco.com/t/flutter-apprentice-08-routes-and-navigation-shared-preferences/207004/4 "2024-11-19T07:26:41Z")

</div>

I’m using vscode, and when I opened the project from this chapter same issue, occured to me, how to resolve this?
