0

I am trying to load a joeschmoe avatar into my ImagView by using glide library. I am doing this:-

   Glide.with(getActivity())
                .asBitmap()
                .load("https://joeschmoe.io/api/v1/random")
                .into(imageView);

but the avatar is not loading ;

I also tried:-

     Glide.with(getActivity()).load("https://joeschmoe.io/api/v1/random").into(imageView);

but is doesn't work also.

Logcat readings are:-

    class java.io.IOException: java.lang.RuntimeException: setDataSource failed: 
    status = 0x80000000
    2020-03-26 01:12:45.833 21573-21573/com.example.hdwallpapers I/Glide: Root cause (1 of 2)
    java.io.IOException: java.lang.RuntimeException: setDataSourceCallback failed: status = 0x80000000
    at com.bumptech.glide.load.resource.bitmap.VideoDecoder.decode(VideoDecoder.java:185)
    at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:92)
    at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70)
    at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59)
    at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76)
    at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57)
    at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:524)
    at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:488)
    at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:474)
    at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:426)
    at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:390)
    at com.bumptech.glide.load.engine.SourceGenerator.onDataFetcherReady(SourceGenerator.java:176)
    at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:94)
Zoe
  • 27,060
  • 21
  • 118
  • 148
Pranav Choudhary
  • 2,726
  • 3
  • 18
  • 38

2 Answers2

0

I checked this joeschmoe.io website and did an inspect element in my browser. the image is not a bitmap, it is SVG image. to load svg with glide i suggest to look at this link.

Reza
  • 845
  • 13
  • 18
0

Glide doesn't support SVG, as per checking the link it's trying to give you an SVG file, try a JPG or PNG

Mike
  • 1,313
  • 12
  • 21