Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jetpack compose: @Preview is unresolved after updating to alpha08

I updated compose libraries from alpha07 to alpha08

version = "1.0.0-alpha08"
androidx.compose.ui:ui:$version
androidx.ui:ui-tooling:$version

But after that androidx.ui.tooling.preview.Preview is unresoved

like image 431
Mahdi-Malv Avatar asked Dec 05 '20 08:12

Mahdi-Malv


1 Answers

Checking out the release note of alpha08 in Jetpack compose, you'll notice that ui-tooling has been moved from androidx.ui to androidx.compose.ui

Changes you need to make:

dependencies {
    // New dependencies
    implementation "androidx.compose.ui:ui-tooling:1.0.0-alpha08"
    testImplementation "androidx.compose.ui:ui-test:1.0.0-alpha08"

    // Old dependencies
    implementation "androidx.ui:ui-tooling:1.0.0-alpha07"
    testImplementation "androidx.ui:ui-test:1.0.0-alpha07"
}
like image 199
Mahdi-Malv Avatar answered Oct 11 '22 09:10

Mahdi-Malv