Glide 加载图片失败
exception: com.bumptech.glide.load.engine.GlideException: Failed to load resource ,obj: xxxxxxxxxxx.jpg target: Target for: com.hotel.widget.CustomImageView{c9c54e4 V.ED..... ........ 0,0-154,115 #7f0900d2 app:id/iv_hotel_img} boolean: true
而在9.0以下的手机可以加载。
解决办法:在AndroidManifest.xml文件里, application字段里 加入 android:usesCleartextTraffic="true"
<application
android:name=".MyApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config">