Closed realityexpander closed 4 months ago
As previously mentioned, this issue isn't directly related to Coil. You can reproduce the issue by not importing Coil at all and adding a reference to org.jetbrains.skia.Bitmap
in common code.
Both mentioned functions are not available in common/Android, they are defined in the appropriate source set. Issue for tracking the problem that IDE shows such suggestions: #3503
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Describe the bug This problem only exists on Android for KMP, for the
Coil 3.0.0-alpha06
library.Attempting to use the results of a pre-loaded
imageLoader.execute(imageResquest).image
in anImage
Composable by converting it using.toBitmap()
and.asComposeImageBitmap()
results in a compile-time errors:Unresolved reference: toBitmap
Unresolved reference: asComposeImageBitmap
Note:
AsyncImage
works as expected in Android when using justimageRequest
.I'm not sure if this is a configuration issue, I checked all the examples and the Coil 3 upgrade guide, and could see no differences.
Referencing this conversation: https://github.com/coil-kt/coil/issues/2246
To Reproduce Here's the line that won't compile when targeting Android: https://github.com/realityexpander/CloudCoverUSA2/blob/56d7575ac95903974b099738a015994aa5fdb972/composeApp/src/commonMain/kotlin/App.kt#L302
Code: https://github.com/realityexpander/CloudCoverUSA2/releases/tag/coil3.alpha06.bug.report
Logs/Screenshots
Version What library version are you using? Does this occur on a specific API level or Android device? coil 3.0.0.alpha-06