Glide在Android 9.0加载不了图片

Glide是一个用于加载图片的优秀框架,但这次却出了意外。。。加载不出图片了???
一开始本人以为是依赖可能太久了,但改了之后还是无法加载出来,这时我很大程度上就觉得是Android9.0的问题了。
最终还是和我想的一样。
解决方案
在AndroidManifest.xml加入android:usesCleartextTraffic="true"

<application
		。。。
        android:usesCleartextTraffic="true">
</application>

至于android:usesCleartextTraffic是什么?
usesCleartextTraffic
图片英文如下:
Attribute usesCleartextTraffic is only used in API level 23 and higher (current min is 15) less… (Ctrl+F1)
Inspection info:This check finds attributes set in XML files that were introduced in a version newer than the oldest version targeted by your application (with the minSdkVersion attribute). This is not an error; the application will simply ignore the attribute. However, if the attribute is important to the appearance or functionality of your application, you should consider finding an alternative way to achieve the same result with only available attributes, and then you can optionally create a copy of the layout in a layout-vNN folder which will be used on API NN or higher where you can take advantage of the newer attribute. Note: This check does not only apply to attributes. For example, some tags can be unused too, such as the new element in layouts introduced in API 21. Issue id: UnusedAttribute
个人理解:
就是一个兼容低版本的属性,并非一个错误来着。( This is not an error)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值