https://kotlinlang.org logo
Title
s

saket

06/30/2021, 5:31 PM
👋 Compose beta09 thinks that my project is using kotlin 1.4.31 instead of 1.5.10. I suspect that this is because some dependencies are pulling in stdlib 1.4.31. Explicitly adding stdlib 1.5.10 as a dependency fixes this error. Is there a better way of solving this?
error: this version (1.0.0-beta09) of the Compose Compiler requires Kotlin version 1.5.10 but you appear to be using Kotlin version 1.4.31 which is not known to be compatible.  Please fix your configuration (or `suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!).
I’ve already tried declaring
kotlinCompilerVersion
and
kotlinCompilerExtensionVersion
under
composeOptions
.
1
e

ephemient

06/30/2021, 5:32 PM
kotlin-bom is always nice, but without knowing the details of your dependencies it's hard to say if it'll help
:today-i-learned: 1
s

saket

06/30/2021, 5:34 PM
TIL of kotlin-bom. Let me try using this!
e

ephemient

06/30/2021, 5:36 PM
dependencies {
    implementation(platform(kotlin("bom"))) // kotlin dsl
    implementation platform("org.jetbrains.kotlin:kotlin-bom:$kotlin_version") // groovy dsl
}
(or something like that, I haven't used groovy dsl for a long time now)
s

saket

06/30/2021, 5:48 PM
Tried it out, but it didn’t help. Thanks anyway @ephemient!
e

ephemient

06/30/2021, 5:49 PM
😞
can you check that your kotlin gradle plugin & compiler version at 1.5.10?
a

ahmedre

06/30/2021, 6:02 PM
i ran into this recently - for me it ended up being that one of the modules that was using compose didn’t explicitly declare
kotlinOptions.kotlinCompilerExtensionVersion
👍 1
1