I'm tryna use Jetpack Compose with latest 1.0.0-al...
# compose
b
I'm tryna use Jetpack Compose with latest 1.0.0-alpha09 version and I can't find @Preview. Did they delete it?
m
I think they not release the
ui-tooling
version
1.0.0-alpha09
yet
b
So i have to use 1.0.0-alpha08 to use it?
m
the last
ui-tooling
version release is
1.0.0-alpha07
b
Thanks a lot
m
you can do:
Copy code
implementation 'androidx.compose.ui:ui:1.0.0-alpha09'
implementation 'androidx.ui:ui-tooling:1.0.0-alpha07'
it works but, the
@Preview
will not work properly
b
I'm using
androidx.compose.ui:ui-tooling:1.0.0-alpha09
without a problem 🤔
m
Copy code
Execution failed for task ':samples:android:mergeDebugResources'.
> Could not resolve all files for configuration ':samples:android:debugRuntimeClasspath'.
   > Could not find androidx.ui:ui-tooling:1.0.0-alpha09.
     Searched in the following locations:
       - <https://kotlin.bintray.com/kotlinx/androidx/ui/ui-tooling/1.0.0-alpha09/ui-tooling-1.0.0-alpha09.pom>
       - <https://dl.google.com/dl/android/maven2/androidx/ui/ui-tooling/1.0.0-alpha09/ui-tooling-1.0.0-alpha09.pom>
       - <https://jcenter.bintray.com/androidx/ui/ui-tooling/1.0.0-alpha09/ui-tooling-1.0.0-alpha09.pom>
       - <https://jitpack.io/androidx/ui/ui-tooling/1.0.0-alpha09/ui-tooling-1.0.0-alpha09.pom>
     Required by:
         project :samples:android

Possible solution:
 - Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
how?
b
let me check the repos
m
Copy code
Execution failed for task ':samples:android:mergeDebugResources'.
> Could not resolve all files for configuration ':samples:android:debugRuntimeClasspath'.
   > Could not find androidx.ui:ui-tooling:1.0.0-alpha08.
     Searched in the following locations:
       - <https://kotlin.bintray.com/kotlinx/androidx/ui/ui-tooling/1.0.0-alpha08/ui-tooling-1.0.0-alpha08.pom>
       - <https://dl.google.com/dl/android/maven2/androidx/ui/ui-tooling/1.0.0-alpha08/ui-tooling-1.0.0-alpha08.pom>
       - <https://jcenter.bintray.com/androidx/ui/ui-tooling/1.0.0-alpha08/ui-tooling-1.0.0-alpha08.pom>
       - <https://jitpack.io/androidx/ui/ui-tooling/1.0.0-alpha08/ui-tooling-1.0.0-alpha08.pom>
     Required by:
         project :samples:android

Possible solution:
 - Declare repository providing the artifact, see the documentation at <https://docs.gradle.org/current/userguide/declaring_repositories.html>
b
I have
Copy code
google()
 jcenter()
 mavenCentral()
as repositories. does it help ?
m
I have too, but google release they tools on they own repository
google()
b
I changed to 07 beta and I got it, when I switch to 09 I don't even have tooling package in ui package
m
You can see the link above for some more context. But ui-tooling was renamed.
Copy code
const val ui_tooling = "androidx.compose.ui:ui-tooling:${Versions.androidx_ui_tooling}"
b
This still doesn't really explain what happened to @Preview and how to preview a composable in beta 09, I can't find a clue in these release notes
b
can you show us your dependency declaration in the build.gradle file ?
b
Copy code
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.ui:ui-tooling:$compose_version"
the version is specified in project gradle file, and its 1.0.0-alpha09
b
As @Matt Lien said, it's now androidx.compose.ui
b
Oh my god I didn't spot the difference in dependency, thanks a lot