Glide在Android 9.0加载不了图片

Android版本 专栏收录该内容
3 篇文章 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
    点赞
  • 5
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值