I tried to migrate from compose beta 06 to 09. How...
# compose
j
I tried to migrate from compose beta 06 to 09. However I always get the following error:
Copy code
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 saw some people had the same problem with previous compose versions. But it seems they had no success in solving this problem. Anyone has an idea? I tried to include the
kotlinCompilerVersion
. No success with or without it. I’m using Kotlin Gradle Scripts.
l
I'm also using kts files for Gradle, and just updating Kotlin to 1.5.10 then doing an invalidate/cache restart was good for me
j
Nope. Didnt’ work 😕
t
have you updated this dependency yet?
Copy code
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10"
j
yes
If anyone runs into the same problem: I have the following dependencies in a
buildSrc
buildscript:
Copy code
implementation(kotlin(module = "stdlib-jdk8"))
implementation(kotlin(module = "gradle-plugin"))
it has a bundles version
1.4.32
. Setting the version manually solved the problem:
Copy code
implementation(kotlin(module = "stdlib-jdk8", version = "1.5.10"))
implementation(kotlin(module = "gradle-plugin", version = "1.5.10"))
t
I found this was required for me:
Copy code
composeOptions {
        kotlinCompilerExtensionVersion compose_version
    }
c
As of kotlin 1.4 I believe stdlib is included automatically so you can remove that line I belive @jannis
j
Ahh - thanks for the hint! Didn’t know that ❤️