https://kotlinlang.org logo
l

Luke

09/18/2020, 8:45 PM
I have some issues integrating compose in my project. I have been referring to the samples as those compile perfectly. Unfortunately, whenever I add in any of my modules :
Copy code
android {
    ...

    composeOptions {
        kotlinCompilerVersion = "1.4.0"
        kotlinCompilerExtensionVersion = "1.0.0-alpha3"
    }

    buildFeatures.compose = true
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile::class.java).configureEach {
    kotlinOptions {
        freeCompilerArgs += listOf(
            "-Xopt-in=kotlin.RequiresOptIn",
            "-Xopt-in=kotlin.Experimental",
            "-Xallow-jvm-ir-dependencies'"
        )
        jvmTarget = "1.8"
    }
}
I keep hitting:
Copy code
Execution failed for task ':my-module:prepareDebugKotlinCompileTask'.
> Could not resolve all files for configuration ':my-module:kotlin-extension'.
   > Could not find androidx.compose:compose-compiler:1.0.0-alpha3.
I don’t understand what could cause this error… Does someone have an idea?
m

Mark Murphy

09/18/2020, 10:38 PM
They use two-digit numbers for the alpha/beta/RC level. Try
1.0.0-alpha03
.
e

efemoney

09/19/2020, 12:16 AM
@Luke There is no
alpha3
artifact anywhere, its
alpha02
as of right now.
v

Val Salamakha

09/19/2020, 1:49 AM
@efemoney EM, you do an error. The last compose version is alpha03.
e

efemoney

09/19/2020, 10:28 AM
Thanks @Val Salamakha, its
alpha03
l

Luke

09/21/2020, 1:22 PM
Ah, yes. I really need to fetch my rubber duck at the office… Thank you
6 Views