Hi everyone I recently started an app with compose multiplateforme. I used the wizard to initialize ...
a
Hi everyone I recently started an app with compose multiplateforme. I used the wizard to initialize the project (https://kmp.jetbrains.com/) . There's just one place where I get stuck: how do I display the preview of my composables ? I've added the dependency (
ui-tooling-preview
) but the ide doesn't display the component preview tab. I add the preview file in composeApp --> androidMain --> Kotlin. What can I do ?
e
Where did you add the dependency?
Did you add the compose settings to the gradle file?
Copy code
android {
buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = libs.versions.composeCompilerVersion.get()
    }
}
a
Ahhh indeed I had simply forgotten about the build compose. It's ok, I've got the preview with this option, plus the compiler in version 1.5.6 with kotlin in 1.9.10. Thanks 👍
👍 1