Prateek Kumar

05/16/2023, 8:37 AM
Is there a way to know which compose desktop code will not work in android? Like i used “loadImageBitmap” from this sample: It works on Desktop but gives “Unresolved reference: loadXmlImageVector” while building for Android.

Arjan van Wieringen

05/16/2023, 8:52 AM
Getting errors at compile time is what you’d expect right?

Prateek Kumar

05/16/2023, 8:59 AM
But this code should work in Android as well , Right? Because i did use some Desktop specific things like painterResource(res: String) But they work without fail. Or am i missing something

Timo Drick

05/25/2023, 8:08 AM
The problem is that in android they are using a different approach for managing resources. So you need to use a different imagePainter instead.
Not sure what you goal is. Because in Android the resources are often also scaled depending on device pixel density.