解决Glide加载Https链接的图片失败

一、问题

原来后端url地址是http的方式,后来改成https,然后所有采用Glide加载的图片都无法正常显示了。

二、解决

打开github上的glide:https://github.com/bumptech/glide/releases,找到对应版本的

 glide-volley-integration-4.7.0.jar或者

glide-okhttp3-integration-4.7.0.jar或者引入aar

implementation'com.github.bumptech.glide:volley-integration:1.3.1@aar'

都可以。

这种问题应该是https网络请求的时候没有设置白名单导致。

jar的内容大致就是这几个类:

现在我们采用volley+glide的方式

最后

在manifest上加入配置

你可能感兴趣的:(解决Glide加载Https链接的图片失败)