aidanvii
05/29/2023, 9:40 AMDima Avdeev
05/29/2023, 9:45 AMaidanvii
05/29/2023, 9:46 AMPreviewParameterProvider
API for desktop?Dima Avdeev
05/29/2023, 9:47 AMPreviewParameterProvider
in the future?aidanvii
05/29/2023, 9:48 AMaidanvii
05/29/2023, 4:31 PMSrSouza
05/29/2023, 6:28 PMDima Avdeev
05/30/2023, 4:50 AMaidanvii
05/30/2023, 12:38 PMbuildFeatures { compose = true }
for android to get the code/design pane split to appearaidanvii
05/30/2023, 1:11 PMval androidMain by getting {
dependencies {
api(compose.preview)
...
}
}
It’s able to resolve all the android preview types (Preview
annotation, PreviewParameterProvider
etc).
However Android Studio gives the following error when trying to render the preview:
The following classes could not be found:
- androidx.compose.ui.tooling.ComposeViewAdapter
This is a problem I’ve seen long ago with Jetpack Compose, and the solution was to add this:
debugImplementation("androidx.customview:customview-poolingcontainer:1.0.0")
But it doesn’t resolve the issue, I think it’s obsolete (for Jetpack Compose anyway). The only thing that did resolve it was to add this, which seems very very wrong 😅:
debugImplementation(platform("androidx.compose:compose-bom:2023.04.01"))
debugImplementation("androidx.compose.ui:ui-tooling")
aidanvii
05/31/2023, 9:06 AMdependencies {
debugApi(compose.uiTooling)
}
in the android block of the shared module, much less complicated than I was making it out to be 🙈