l

    Luke

    2 years ago
    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 :
    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:
    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

    2 years ago
    They use two-digit numbers for the alpha/beta/RC level. Try
    1.0.0-alpha03
    .
    e

    efemoney

    2 years ago
    @Luke There is no
    alpha3
    artifact anywhere, its
    alpha02
    as of right now.
    v

    Val Salamakha

    2 years ago
    @efemoney EM, you do an error. The last compose version is alpha03.
    e

    efemoney

    2 years ago
    Thanks @Val Salamakha, its
    alpha03
    l

    Luke

    2 years ago
    Ah, yes. I really need to fetch my rubber duck at the office… Thank you