I upgraded my Android project to Kotlin 2.0, but I still can’t use Kotlin 2.0 features. I believe I have done the integration correctly, yet I keep encountering this issue. Could you please help me?
libs.toml
[plugins]
kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "2.0.0"}
app.gradle
plugins {
alias(libs.plugins.kotlin.compose.compiler) apply false
}
build.gradle
plugins {
alias(libs.plugins.kotlin.compose.compiler)
}
gradle.properties
kapt.use.k2=true
ksp.useK2=true
I also removed composeOptions
from the build.gradle
file. The error is shown in the image below.