android.resource Uris that point to another package's resource ID fail to load
See original GitHub issueDescribe the bug
imageView.load(uri)
doesn’t load image from android.resource://
uri.
To Reproduce
- Apply this patch to coil sample app.
- Run sample app
- Notice icon image is not loaded.
- To check expected result comment out
detail.load(uri)
and un-commentdetail.setImageURI(uri)
Expected behavior Image loaded from uri
Logs/Screenshots
Current | Expected |
---|---|
Library version 0.6.1
tested on Android 10
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
App resources overview - Android Developers
This document shows you how to group your resources in your Android project and provide alternative resources for specific device configurations ...
Read more >Error - Android resource linking failed (AAPT2 27.0.3 Daemon ...
According to the above error, the first thing you need to do is to proof read all the drawable resources that are accessed...
Read more >Image - .NET MAUI | Microsoft Learn
The .NET MAUI Image displays an image that can be loaded from a local file, a URI, an embedded resource, or a stream....
Read more >Location-Independent Access to Resources
home") , then add "/lib/resource", and open that file. Methods in the classes Class and ClassLoader provide a location-independent way to locate resources....
Read more >Loading JSON data from Cloud Storage | BigQuery
If you include a generation number in the Cloud Storage URI, then the load job fails. When you load JSON files into BigQuery,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed.
android.resource
Uris that point to a vector drawable (or anything that can’t be handled byBitmapFactory
currently won’t load correctly. Have an idea in mind of how to fix this and will make sure the fix makes it into 0.7.0.As a work around you can pass the resource ID directly to load:
.load(R.drawable.image)
Thanks, I’ll take a look into this next week (away on holiday this week).