图片加载不出来

来源:2-3 Glide加载网络图片

qq_Heucheleisir_0

2019-07-03 19:26

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.net.SocketException(socket failed: EPERM (Operation 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.net.SocketException(socket failed: EPERM (Operation 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.net.SocketException(socket failed: EPERM (Operation not permitted))

     call GlideException#logRootCauses(String) for more detail

          Cause (1 of 1): class java.net.SocketException: socket failed: EPERM (Operation not permitted)

I/Glide: Root cause (1 of 1)

    java.net.SocketException: socket failed: EPERM (Operation not permitted)

        at java.net.Socket.createImpl(Socket.java:492)

        at java.net.Socket.getImpl(Socket.java:552)

        at java.net.Socket.setSoTimeout(Socket.java:1180)

        at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:143)

        at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:116)

        at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:186)

        at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:128)

        at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:97)

        at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:289)

        at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:232)

        at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:465)

        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)


写回答 关注

2回答

  • 阿狸飞
    2019-07-20 14:48:03

    把虚拟机sdk版本调低,不要用9.0的。9.0增加了更严格的权限,用8.0的就可以了https://img2.mukewang.com/5d32b91d0001bf0916490252.jpg

    慕工程933...

    感谢感谢成功了

    2021-04-09 20:48:50

    共 1 条回复 >

  • qq_Heucheleisir_0
    2019-07-03 19:27:29

    https://img.mukewang.com/5d1c911000014b8419291041.jpg截图这样

我的云音乐(二)

高仿网易云音乐,从零开始开发一款专属自己的音乐APP。

7935 学习 · 82 问题

查看课程

相似问题