I was building a Compose Multiplatform project (An...
# compose-desktop
s
I was building a Compose Multiplatform project (Android and Desktop). I want to add Images to shared Common Main file and use the image files for UI in commonMain. I tried creating a resource folder in commonMain and added Image in those. And tried to use them by following
Copy code
val file = File("resources/dogImage.jpg")
val imageBitmap: ImageBitmap = remember(file) {
    loadImageBitmap(file.inputStream())
}
Image(
    painter = BitmapPainter(image = imageBitmap),
    contentDescription = null)
It is showing error that file not found is there any way for it
m
s
Thanks it worked