if (mContext != null) { Glide.with(mContext) .load("http://res.lgdsunday.club/poster-1.png") .into(viewHolder.ivIcon);
打包以后手机上显示正常 但是在api29虚拟机上 显示不出来图片 网络限权也添加了
<uses-permission android:name="android.permission.INTERNET" />
W/Glide: Load failed for http://res.lgdsunday.club/poster-1.png with size [353x353]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.io.IOException(Cleartext HTTP traffic to res.lgdsunday.club not permitted)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
There was 1 cause:
java.io.IOException(Cleartext HTTP traffic to res.lgdsunday.club not permitted)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed
There was 1 cause:
java.io.IOException(Cleartext HTTP traffic to res.lgdsunday.club not permitted)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.io.IOException: Cleartext HTTP traffic to res.lgdsunday.club not permitted
I/Glide: Root cause (1 of 1)
java.io.IOException: Cleartext HTTP traffic to res.lgdsunday.club not permitted
at com.android.okhttp.HttpHandler$CleartextURLFilter.checkURLPermitted(HttpHandler.java:124)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:462)
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:104)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:59)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.startNextOrFail(MultiModelLoader.java:164)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onLoadFailed(MultiModelLoader.java:154)
at com.bumptech.glide.load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:65)
at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:309)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:279)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:235)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
晓黑黑杂
相关分类