You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When targeting Android for a KMP project using Coil 3.0.0-alpha06, attempting to use .toBitmap() and .asComposeImageBitmap() results in Unresolved reference#4797
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 an Image Composable by converting it using .toBitmap() and .asComposeImageBitmap() results in a compile-time errors:
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
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: coil-kt/coil#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
The text was updated successfully, but these errors were encountered: