Trying to load images with similar URLs like this
"https://firebasestorage.googleapis.com/v0/b/content-office-e1931.appspot.com/o/usersData%2Fposts%2Fmedia_-KpGAURJbB33BKhTynV1?alt=media&token=26135949-a918-4572-9293-b639d43f04aa"
But glide shows logs
Load failed for with size [360x360]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
Previous logs
Failed to find GeneratedAppGlideModule. You should include an annotationProcessor
compile dependency on com.github.bumptech.glide:glide:compiler in your application
and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules
will be silently ignored
I can't understand why I should add AppGlideModule and etc just to load images. My code in Kotlin, I have added compiler dependency as below
//image loader
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
kapt 'com.github.bumptech.glide:compiler:4.0.0-RC1'
Here is how I call Glide
fun bind(post: Post) {
for ((k, v) in post.media) {
Glide.with(itemView.context)
.asBitmap()
.apply(RequestOptions.encodeQualityOf(70))
.apply(RequestOptions.overrideOf(width,width))
.apply(RequestOptions.centerCropTransform())
.load(v.downloadPath)
.into(image)
}
}
I had tried attach a listener to see logs, what is happening when Glide tries to load image but I see only "Failed to load resource" nothing useful
it's working with me :
Glide.with(itemView.context)
.load(new URL(v.downloadPath))
.into(image);
I don't know is this solution going work for everyone but in my case it worked !
<application
android:usesCleartextTraffic="true"
</application>
and try to load your image in this format
Glide.with(context)
.load(new URL(your_image))
.into(image)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With