使用 Glide、Picasso、Coli、Fresco 加载图像时出错

问题描述

我无法从 API https://github.com/Teknologica/meta-weather-test-app 加载图像,因为我使用此 URL https://www.metaweather.com/static/img/weather/s.svg 从未在 glide 中加载图像,而 Picasso 侦听器会在错误下方返回我。

错误java.lang.RuntimeException: setDataSource Failed: status = 0x80000000

我阅读了文档,错误是因为 0x80000000 表示文件不完整、已损坏或类似的东西。但如果你去 URL 看完整的图像。

我的线圈代码很简单

imageView.load("https://www.Metaweather.com/static/img/weather/s.svg")

和毕加索一起

 Picasso.with(context)
                .load(String.format(ConstantesRetrofit.API_FILES_URL,estadoclimaSufijo))
                .error(R.drawable.ic_cloud)
                .into(holder.iVTipoclima);

就是这样,我对帮助我的人感到非常满意

解决方法

您可以查看此示例:https://github.com/bumptech/glide/blob/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg/MainActivity.java