google-developer-training/basic-android-kotlin-compose-training-inventory-app

Persist data with Room

Closed this issue · 1 comments

URL of codelab:
https://developer.android.com/codelabs/basic-android-kotlin-compose-persisting-data-room#0

Specify the language of the codelab if it is not English:

In which task and step of the codelab can this issue be found?
Step 3: Starter app overview

Describe the problem
After download the start file from github link provided, I build the project to observe the starter code, but I have got build error message:

Execution failed for task ':app:compileDebugJavaWithJavac'.
Could not resolve all files for configuration ':app: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\shini\AppData\Local\Android\Sdk\platforms\android-34\core-for-system-modules.jar.
> Error while executing process C:\Program Files\Android\Android Studio\jbr\bin\jlink.exe with arguments {--module-path C:\Users\shini.gradle\caches\transforms-3\638c47727553f738384f40da2f15bd76\transformed\output\temp\jmod --add-modules java.base --output C:\Users\shini.gradle\caches\transforms-3\638c47727553f738384f40da2f15bd76\transformed\output\jdkImage --disable-plugin system-modules}

Steps to reproduce?

  1. Open the app using Android Studio
  2. Build -> Rebuild Project
  3. See error as described above

Versions
Android Studio version: 2024.2.1 Patch 1
API version of the emulator: 35

Additional information
image

I fixed the issue by Upgrading AGP
Tools -> AGP Upgrade Assistant -> Upgrade the latest version -> Rebuild