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

Geert

07/28/2021, 3:25 PM
I just updated Android Studio and build.gradle to use compose 1.0.0-rc02 but since then some of my files wont work. I already invalidated cache and restarted AS and PC.
k

kevindmoore

07/28/2021, 3:44 PM
I’ve been struggling with this for awhile. I had to try many combinations of versions but here is what I have:
Copy code
const val kotlin = "1.5.21"
    const val kotlin_gradle_plugin = "1.5.21"
    const val android_gradle_plugin = "7.1.0-alpha03"
Copy code
const val compose= "1.0.0-rc02"
(I completely uninstalled AS versions thinking that was the problem)
a

alorma

07/28/2021, 3:46 PM
What version of kotlin are you using?
k

kevindmoore

07/28/2021, 3:46 PM
1.5.21
I found that the gradle plugin 7.1.0-alpha04 did not work
a

alorma

07/28/2021, 3:47 PM
Try kotlin 1.5.10
👍 1
k

kevindmoore

07/28/2021, 3:47 PM
That also seemed to work, but I needed 21 for desktop compose
a

alorma

07/28/2021, 3:47 PM
Also, depends on the AS, arctic fox uses
7.0.0-betaXX
, bumblebee uses alphas
k

kevindmoore

07/28/2021, 3:48 PM
(I was using bumblebee but am on fox now)
g

Geert

07/28/2021, 3:54 PM
I have:
Copy code
classpath 'com.android.tools.build:gradle:7.0.0-rc01'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
and:
Copy code
// Kotlin
        ktx_version = '1.3.2'
        kotlin_version = "1.5.10"

        // Compose Versions
        accompanist_version = "0.12.0"
        compose_version = "1.0.0-rc02"
        nav_compose_version = "2.4.0-alpha04"
        activity_compose_version = "1.3.0-beta02"
        lifecycle_compose_version = "1.0.0-alpha07"
        constraint_compose_version = "1.0.0-alpha08"
and:
Copy code
composeOptions {
        kotlinCompilerVersion '1.5.10'
        kotlinCompilerExtensionVersion compose_version
    }
Cant see whats wrong with it.
Oh wait, maybe its com.android.toold.build:gradle.
h

Huan

07/28/2021, 4:01 PM
I got working with
Copy code
"com.android.tools.build:gradle:7.0.0-rc01"
Kotlin 1.5.10
Copy code
com.google.firebase:firebase-crashlytics-gradle:2.6.1 --> Without this version thrown a strange error 

distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip