Update:
Thanks @Samuel Luís for finding a Compose to Kotlin compatibility table
https://developer.android.com/jetpack/androidx/releases/compose-kotlin
Update: androidx.compose.compiler:compiler:1.0.0-beta08 is released (June 2, 2021).
From this version, the expected version of Kotlin is 1.5.10.
dependencies {
implementation "androidx.compose.compiler:compiler:1.0.0-beta08"
}
android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerVersion "1.5.10"
kotlinCompilerExtensionVersion "1.0.0-beta08"
}
kotlinOptions {
jvmTarget = "1.8"
}
}
See more:
- Compose
- Compose Compiler
Compose compiler 1.0.0-beta07 is not supporting Kotlin 1.5.0 yet.
And I found that the changes of supporting Kotlin 1.5.0 have merged, but not released yet.
https://android-review.googlesource.com/c/platform/frameworks/support/+/1651538
For this moment, in my opinion, you should use 1.4.3 and wait for the next version (1.0.0:beta08 or 1.0.0)