Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

[Codelab Issue] Testing Codelab 5.1#, Step 3# - The code from "starter_code" branch is not building in Android Studio, Flamingo. #292

Open
Suparna-here opened this issue Jul 8, 2023 · 7 comments

Comments

@Suparna-here
Copy link

Suparna-here commented Jul 8, 2023

Describe the problem
The code from "starter_code" branch is not building in Android Studio, Flamingo.

In which lesson and step of the codelab can this issue be found?
5.1(Test Basics), step 3(Getting Started).

How to reproduce?
Imported the starter_code in Android Studio Flamingo | 2022.2.1 Patch 2
However, the Build fails.

Versions

  1. Imported the starter_code in Android Studio Flamingo | 2022.2.1 Patch 2

Additional information
Update Gradle Plugin, Android Gradle Plugin, and target SDK version to 33. Still not building successfully

codelab: advanced-android-kotlin

@Suparna-here Suparna-here changed the title [Codelab Issue] Testing Codelab 5.#, Step # - Issue description [Codelab Issue] Testing Codelab 5.1#, Step 3# - Issue description Jul 8, 2023
@Suparna-here Suparna-here changed the title [Codelab Issue] Testing Codelab 5.1#, Step 3# - Issue description [Codelab Issue] Testing Codelab 5.1#, Step 3# - The code from "starter_code" branch is not building in Android Studio, Flamingo. Jul 8, 2023
@CyxouD
Copy link

CyxouD commented Sep 5, 2023

The same for me. I tried both updating Gradle version to support my Java 17 version and downgrading Java version to 16 to support project's Gradle version. This fix probably didn't help 915dbfl@c70365a.
I get java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x65522ea3) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x65522ea3

@kgopalan-droid
Copy link

Yes, I am having the same issue. please fix it

@Milksoplimit
Copy link

Temporary fix I found was under File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle and setting the Gradle JDK field to JDK 11

@mrfatworm
Copy link

  • Set JDK field to JDK 15
  • Update RoomVersion to 2.4.0

I am using Apple M2 Pro chip, it worked for me

@Kazoroo
Copy link

Kazoroo commented Dec 17, 2023

I had to update version of com.android.tools.build:gradle to 7.0.4, and then worked fine.

@FlyingBackdoor
Copy link

FlyingBackdoor commented Mar 27, 2024

Looks like it is more broken with Iguana, no solution is working for me
Getting the following error

Could not compile initialization script 'C:\Users\X\AppData\Local\Temp\ijMapper1.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 61
  
  java.lang.IllegalArgumentException: Unsupported class file major version 61

@bst-wd
Copy link

bst-wd commented Oct 31, 2024

  • Set JDK field to JDK 15

  • Update RoomVersion to 2.4.0

I am using Apple M2 Pro chip, it worked for me

Thanks! Fixed it for me on Apple M1 Pro with Android Studio Ladybug (2024.2.2).
Also works with JDK 11 and Room 2.4.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants