When I set `source/targetCompatibility` and `kotli...
# android
l
When I set
source/targetCompatibility
and
kotlinOptions { jvmTarget }
to 17, I get the followig error:
Copy code
Execution failed for task ':app:transformDebugClassesWithAsm'.
> A failure occurred while executing com.android.build.gradle.tasks.TransformClassesWithAsmTask$TransformClassesIncrementalAction
   > Error occurred while instrumenting class com.myapp.MyClass
MyClass
is a sealed class.
choices: • don't target java 17 • use prerelease r8 • use prerelease AGP
l
Thanks!
m
👋 I face the same issue @ephemient why do you mean by use prerelease r8 ? I don't find any alpha version of R8
l
I just downgraded to Java 11
m
ok thx. If someone face the same issue, I upgrade AGP to 8.2 and R8 to 8.2.33, and it works well even with sealed class. (I followed https://issuetracker.google.com/issues/227160052#comment37)
👍 1
157 Views