Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

class com.bumptech.glide.load.engine.GlideException: Failed to load resource

I am trying to load an image into imageView through Glide. But the image is not loaded - I get an error. I'm using the following code

GlideApp.with(context)     .load(itemData.getThumbnailUri())     .placeholder(R.mipmap.koya_logo_white)     .error(R.mipmap.ic_image_loading_error)     .into(itemBinding.cover); 

Logs

lide: Load failed for https://s3.amazonaws.com/koya-dev-videos/kindness/8da807aa-1e1e-413d-bf9b-5bb084646593/medialibrary/9456621508/videos/1eb78337-d569-41bd-95ad-153d9098de03.png with size [1080x1080] 
class com.bumptech.glide.load.engine.GlideException: Failed to load resource Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Failed LoadPath{StringUri->Object->Drawable}, LOCAL, DataCacheKey{sourceKey=https://s3.amazonaws.com/koya-dev-videos/kindness/8da807aa-1e1e-413d-bf9b-5bb084646593/medialibrary/9456621508/videos/1eb78337-d569-41bd-95ad-153d9098de03.png, signature=EmptySignature} Cause (1 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{StringUri->Drawable->Drawable} Cause (2 of 2): class com.bumptech.glide.load.engine.GlideException: Failed DecodePath{StringUri->Bitmap->Drawable} 
like image 323
narender sharma Avatar asked Apr 02 '19 10:04

narender sharma


Video Answer


1 Answers

Try this solution...

String url = "https://s3.amazonaws.com/koya-dev-videos/kindness/8da807aa-1e1e-413d-bf9b-5bb084646593/medialibrary/9456621508/videos/1eb78337-d569-41bd-95ad-153d9098de03.png";      GlideApp.with(context).load(url)         .override(Target.SIZE_ORIGINAL, Target.SIZE_ORIGINAL)         .error(R.drawable.glide_app_img_loader)         .listener(new RequestListener<Drawable>() {              @Override              public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {                  return false;              }                   @Override              public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {                  return false;              }         }).into(imageView); 
like image 104
VIISHRUT MAVANII Avatar answered Sep 19 '22 04:09

VIISHRUT MAVANII