-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When targeting Android for a KMP project using Coil 3.0.0-alpha06, attempting to use .toBitmap()
and .asComposeImageBitmap()
results in Unresolved reference
#2246
Comments
.toBitmap()
and .asComposImageBitmap()
results in Unresolved reference
.toBitmap()
and .asComposIemageBitmap()
results in Unresolved reference
.toBitmap()
and .asComposIemageBitmap()
results in Unresolved reference
.toBitmap()
and .asComposeImageBitmap()
results in Unresolved reference
Thanks for the repro. I believe this is a Compose Multiplatform/Skia error. Compose Multiplatform exposes To fix this you'll have to create an expect/actual function that uses the Skia |
It's very strange, because the project builds and compiles for the other platforms... I'm sure this is going to be a common issue for people using the library on Android. Is this something that sounds worthwhile to fix for Android? |
It's an issue with how Compose Multiplatform exposes its Skia dependency - not Coil. Coil only exposes the Skia dependency on non-Android platforms. It's not possible to fix from Coil's code. I'd recommend reporting the issue to the Compose Multiplatform team. |
I see that it's a Skia dependency issue, and you are still recommending that I create a custom solution for it or ask JetBrains to fix it? Is this the final answer? |
I have submitted the issue at Compose Multiplatform team: |
The issue is |
Describe the bug
This problem only exists on Android for KMP.
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.
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: