compose previews don't work for me in multiplatform, i have defined the @Preview
the top right side of the code window doesn't allow me to check the preview
Copy code
val androidMain by getting {
dependencies {
implementation(compose.preview)
implementation(libs.androidx.activity.compose)
implementation(libs.bundles.androidApp)
implementation(libs.billing.ktx)
}
}
val commonMain by getting {
dependencies {
implementation(libs.bundles.database)
implementation(libs.bundles.kmp.firebase)
implementation(libs.bundles.kotlin)
implementation(libs.bundles.ktor)
implementation(libs.bundles.utils)
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(compose.ui)
implementation(compose.components.resources)
implementation(compose.components.uiToolingPreview)
}
}
m
Muaz KADAN
09/17/2024, 9:49 AM
Compose Multiplatform Previews doesn't work in Android Studio in common module
they only work in Fleet
f
François
09/17/2024, 9:51 AM
you can have some preview with android studio, if you run your preview from the android target
p
Priyansh Nama
09/18/2024, 6:06 AM
@Muaz KADAN just done setting up my fleet, now how do i get the preview, is there any plugin or option i need to install or activate
m
Muaz KADAN
09/18/2024, 6:13 AM
When you annotate a function with @Preview you must see a compose icon on the left of it
Muaz KADAN
09/18/2024, 6:14 AM
The preview will start when you click on that icon