Has anyone gotten Compose Multiplatform resources ...
# compose-desktop
s
Has anyone gotten Compose Multiplatform resources working with
com.android.kotlin.multiplatform.library
? I just migrated to fix the compiler warnings and it seemed like my only option was to create a separate Android app module to use the android
application
plugin. I'm hitting
MissingResourceException
at runtime in the android app, as the target doesn't seem to have access to the
composeResources
from the shared compose library. Is there an official fix, or do I need a manual workaround?
m
Perhaps the same issue I had with my iOS app. I got Claude to write something to include copying the shared resources during the build process. Very nasty. Very frustrating that this needs to be done.
s
yeah, I had claude do the same. This is what it came up with:
Copy code
// Ensure Compose resources are prepared before Android asset merging
afterEvaluate {
    tasks.matching { it.name.contains("merge") && it.name.contains("Assets") }.configureEach {
        dependsOn(project(":app").tasks.named("jvmProcessResources"))
    }
}
🫣 1