I am testing by creating a compose ios+android sam...
# multiplatform
j
I am testing by creating a compose ios+android sample project. I want to use
@Preview
, but I get an error when I add
implementation(compose.preview)
dependency to the commonMain module. Is there any way to use preview in common module?
Copy code
> Could not resolve all dependencies for configuration ':shared:iosArm64CompileKlibraries'.
   > Could not resolve org.jetbrains.compose.ui:ui-tooling-preview:1.4.0.
     Required by:
         project :shared
      > No matching variant of org.jetbrains.compose.ui:ui-tooling-preview:1.4.0 was found. The consumer was configured to find a usage of 'kotlin-api' of a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' but:
          - Variant 'debugApiElements-published' capability org.jetbrains.compose.ui:ui-tooling-preview:1.4.0 declares an API of a library: