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

Pardeep Sharma

08/11/2021, 6:48 AM
Any recommendation here, please?
@Ian Lake This is clearly a problem with compose UI dependencies bcz If I am using the below version UI works fine:
Copy code
compose_version = '1.0.0-rc02'

implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling:$compose_version"
implementation "androidx.navigation:navigation-compose:$compose_version"
Though I need to use the latest version of dependencies, so using these versions:
Copy code
object Compose {
    private const val activityComposeVersion = "1.1.0-alpha01"
    const val activity = "androidx.activity:activity-compose:$activityComposeVersion"

    const val composeVersion = "1.1.0-alpha01"
    const val ui = "androidx.compose.ui:ui:$composeVersion"
    const val material = "androidx.compose.material:material:$composeVersion"
    const val tooling = "androidx.compose.ui:ui-tooling:$composeVersion"

    private const val navigationVersion = "2.4.0-alpha06"
    const val navigation = "androidx.navigation:navigation-compose:$navigationVersion"

    private const val hiltNavigationComposeVersion = "1.0.0-alpha03"
    const val hiltNavigation = "androidx.hilt:hilt-navigation-compose:$hiltNavigationComposeVersion"
}
I am facing below error in Android studio (2021.1.1 Canary 7):
androidx.compose.compiler.plugins.kotlin.IncompatibleComposeRuntimeVersionException: You are using an outdated version of Compose Runtime that is not compatible with the version of the Compose Compiler plugin you have installed. The compose compiler plugin you are using (version 1.1.0-alpha01) expects a minimum runtime version of 1.1.0-alpha01. The version of the runtime on the classpath currently is <unknown>.
at androidx.compose.compiler.plugins.kotlin.VersionChecker.outdatedRuntime(VersionChecker.kt:125)
at androidx.compose.compiler.plugins.kotlin.VersionChecker.check(VersionChecker.kt:98)
Any idea how to resolve this?
c

Colton Idle

08/11/2021, 2:22 PM
Did you add this to your app level build.gradle
Copy code
composeOptions {
        kotlinCompilerExtensionVersion '1.0.1'
    }
2 Views