JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.87k stars 1.15k forks source link

R.Drawable file not in Compose Multiplatform #3704

Closed doriancrutcher closed 11 months ago

doriancrutcher commented 11 months ago

I'm not sure if this is a big common issue, but I just underwent the Compose Tutorial for android specific apps and while building out my demo app I noticed that I can't seem to find a drawable folder to place test images in.

And I can't find documentation on how to get around this.

Is this a feature that can be added?

yuroyami commented 11 months ago

You should use moko-resources library to share resources between platforms.

doriancrutcher commented 11 months ago

You should use moko-resources library to share resources between platforms.

Ah very cool thank you for the info!

yuroyami commented 11 months ago

@doriancrutcher You're welcome. Let me know if you need anything when you try to integrate moko-resources into your KMM project. It can be a bit confusing at first.

MatkovIvan commented 11 months ago

It appears the issue you're experiencing isn't linked directly to Compose, but to the Android specific resource generation side of things.

As of now, we currently don't have plans to integrate this feature, but there are a few alternatives out there like 'moko resources' (as mentioned earlier).

okushnikov commented 1 month ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.