https://kotlinlang.org logo
#compose
Title
# compose
m

Manuel Lorenzo

12/04/2020, 5:49 PM
hi everyone, I’m trying to upgrade a library from using alpha04 to alpha08 and I have added the following to the `build.gradle.kts`:
Copy code
android {
  buildFeatures {
        compose = true
    }

    compileOptions {
        targetCompatibility = JavaVersion.VERSION_1_8
        sourceCompatibility = JavaVersion.VERSION_1_8
    }
    composeOptions {
        composeOptions.kotlinCompilerVersion = versionsProperties["version.kotlin"].toString()
        kotlinCompilerExtensionVersion = versionsProperties["version.androidx.ui"].toString()
    }
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs = listOf("-Xallow-jvm-ir-dependencies", "-Xskip-prerelease-check")
        useIR = true
    }
}
However, I’m still getting the following error message for several classes:
Copy code
Class 'androidx.compose.ui.Modifier' is compiled by a new Kotlin compiler backend and cannot be loaded by the old compiler
m

Manuel Lorenzo

12/08/2020, 7:45 AM
Not sure if it's because I just woke up but I can't see the difference? 😔
I just tried and nothing, same issue 😞