I just want to Migrate from Moko Resource to Compo...
# multiplatform
k
I just want to Migrate from Moko Resource to Compose Resource in Kotlin Multiplatform with Shared UI. Facing Some issues while integrating the Compose Resource Library.
Copy code
implementation("org.jetbrains.compose.resources:resources:1.7.3")
Anyone, who has integrated ?
m
It works for me. I guess your dependency is wrong.
Copy code
implementation("org.jetbrains.compose.components:components-resources:1.7.3")
Follow these tutorials: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-resources-setup.html https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-resources-usage.html
1
k
Are you sure? I'm using the Kotlin Multiplatform Project (Android + iOS) with native ui. I added the dependency and now I don't get any error but the generateResourceAccessorsForCommonMain Doesn't work and does not generate any resource in composeResources, I'm already using the moko resources. Do you have any docs for the migrations from Moko to compose resources?
m
I use it all the time so it does work in general. I don’t know of any migration guides. Just remove any Moko stuff because it might conflict with the new stuff. You have to place your resources into a folder composeApp/src/commonMain/composeResources/files or drawables or ??? according to the documentation. And as I said already your dependency is wrong.
1