Guys, I’m haunted with `Class 'androidx.compose.ui...
# compose
Guys, I’m haunted with
Class 'androidx.compose.ui.geometry.Offset' is compiled by a new Kotlin compiler backend and cannot be loaded by the old compiler
. Please halp. I did everything including adding
useIR = true
freeCompilerArgs += ["-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check"]
in all places,
compose true
and all. How can I validate that IR is actually enabled? Using Kotlin 1.4.10, Compose 1.0.0-alpha03
Maybe it’s worth mentioning that I get this error in debugger trying to print out some
Actually print in code works fine! It must be the debugger/Kotlin plugin using old backend
Did you add those compiler args in the
block? It should be applied generally, like so:
Copy code
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs += ["-Xallow-jvm-ir-dependencies"]
Yep, added in the android block and applied on all
tasks as well. It actually works in runtime now as I wrote earlier, it’s just the debugger expression evaluator (which depends on IDEA Kotlin plugin I think) which prints such error instead of desired output. I don’t think the plugin respects gradle settings at all. Anyway thanks for response 🙂