Vsevolod Ganin

    Vsevolod Ganin

    2 years ago
    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


    2 years ago
    Did you add those compiler args in the
    block? It should be applied generally, like so:
    tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
        kotlinOptions {
            jvmTarget = "1.8"
            freeCompilerArgs += ["-Xallow-jvm-ir-dependencies"]
    Vsevolod Ganin

    Vsevolod Ganin

    2 years ago
    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 🙂