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

romainguy

01/30/2021, 10:09 PM
Not quite yet
👍 2
l

Lilly

01/30/2021, 10:19 PM
@romainguy My installed version is now 1.4.30-RC but my gradle version is 1.4.21-2. Now my whole code is marked red with the message:
Class 'androidx.compose.material.TextKt' is compiled by an unstable version of the Kotlin compiler and cannot be loaded by this compiler
Is it because of the Kotlin version and when yes how can I install a previous version?
Seems there is no possibility to change the version via gui?
a

Alexjlockwood

01/31/2021, 3:03 AM
You probably have to wait for an updated version of compose that supports the RC. Right now alpha11 doesn't support it
z

Zach Klippenstein (he/him) [MOD]

01/31/2021, 7:17 AM
I haven’t had any issues with alpha 10 using kotlin 1.4.21 compiler and the 30-RC IDE plugin. Usually it’s fine if your ide plug-in is a slightly newer version.
z

Zhelyazko Atanasov

01/31/2021, 8:28 AM
@Lilly I think that you should enable the new Kotlin IR backend. Although I have this in my project:
Copy code
buildFeatures {
   compose true
}
I still had to explicitly enable IR in order to clear out the
Class XXX is compiled by an unstable version of the Kotlin
error. To enable IR, add this to your app's module _build.gradle_:
Copy code
kotlinOptions {
    useIR = true
}
l

Lilly

01/31/2021, 8:15 PM
Thanks guys. @Zhelyazko Atanasov that doesn't work for me. I will downgrade AS to 04
6 Views