Francis Mariano
03/04/2023, 3:32 PM"org.jetbrains.compose.components:components-resources:1.3.1-rc01"
to load images images via compose in common module, but the images are not loaded. More info in the thread.Image(
bitmap = resource("logo.jpg").rememberImageBitmap().orEmpty(),
contentDescription = null
)
Image(
painter = painterResource("logo.jpg"),
contentDescription = null
)
Image()
is not load the image and the second Image()
crash the app with the following message:
Caused by: org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: logo.jpg
The resource is missing. What is the right path to put the resources???Jeff Lockhart
03/04/2023, 4:38 PMFrancis Mariano
03/06/2023, 3:44 PMJeff Lockhart
03/06/2023, 4:31 PMFrancis Mariano
03/06/2023, 4:42 PMJeff Lockhart
03/06/2023, 4:44 PMFrancis Mariano
03/06/2023, 4:44 PMsourceSets["main"].resources.srcDir("src/commonMain/resources")
if different of:
sourceSets["main"].res.srcDirs("src/androidMain/res", "src/commonMain/resources")
Jeff Lockhart
03/06/2023, 4:56 PMsrc/commonMain/resources
to src/androidMain/resources/assets
, as I consume the common resources as Android assets in my Android actual
implementations.