1

在显示来自 firebase 存储的 downloadurl 的图像时,我从 glide 库中收到此错误。

https://firebasestorage.googleapis.com/v0/b/java-project-21.appspot.com/o/yFERY8j8snZesnVfrn74TNekTUR2.jpg?alt=media&token=ba062708-83f6-4d0e-b3fd-d3a9a69ed24d的加载失败 ,大小为 [140x140 ] class com.bumptech.glide.load.engine.GlideException: 加载资源失败有 1 个原因:javax.net.ssl.SSLHandshakeException(Connection closed by peer) call GlideException#logRootCauses(String) 了解更多详细信息原因(1 个1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE 有 1 个原因:

javax.net.ssl.SSLHandshakeException(Connection closed by peer)
 call GlideException#logRootCauses(String) for more detail
    Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetch failed
There was 1 cause:
javax.net.ssl.SSLHandshakeException(Connection closed by peer)
 call GlideException#logRootCauses(String) for more detail
      Cause (1 of 1): class javax.net.ssl.SSLHandshakeException: Connection closed by peer 2020-03-29 12:47:18.165

13829-13829/com.example.javaproject21 I/Glide:根本原因(1 个中的 1 个)javax.net.ssl.SSLHandshakeException:com.google.android.gms.org.conscrypt.NativeCrypto.SSL_do_handshake(Native方法)在 com.google.android.gms.org.conscrypt.NativeSsl.doHandshake(:com.google.android.gms@200616026@20.06.16 (100306-296104215):6) 在 com.google.android.gms。 org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(:com.google.android.gms@200616026@20.06.16 (100306-296104215):14) at com.android.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:1483 ) 在 com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1427) 在 com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1371)在 com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:219) 在 com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:142) 在 com.android.okhttp .internal.http.StreamAllocation.newStream(StreamAllocation.java:104) 在 com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:392) 在 com.android.okhttp.internal.http.HttpEngine.sendRequest (HttpEngine.java:325) 在 com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:488) 在 com.android.okhttp.internal.huc.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:131) 在com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.connect(DelegatingHttpsURLConnection.java:89) 在 com.android.okhttp.internal.huc.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:26) 在 com.bumptech.glide.load.data.HttpUrlFetcher.loadDataWithRedirects(HttpUrlFetcher.java:100) 在 com.bumptech.glide .load.data.HttpUrlFetcher.loadData(HttpUrlFetcher.java:56) 在 com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100) 在 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:62) 在 com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:100) 在 com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:70) 在 com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:63) 在 com.bumptech.glide .load.engine.DecodeJob.runGenerators(DecodeJob.java:310) 在 com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:279) 在 com.bumptech.glide.load.engine.DecodeJob.run (DecodeJob.java:234) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 在 java.lang.Thread。运行(Thread.java:764)SourceGenerator.startNext(SourceGenerator.java:63) 在 com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:310) 在 com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java: 279) 在 com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:234) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 在 java.util.concurrent.ThreadPoolExecutor$Worker .run(ThreadPoolExecutor.java:641) 在 java.lang.Thread.run(Thread.java:764)SourceGenerator.startNext(SourceGenerator.java:63) 在 com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:310) 在 com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java: 279) 在 com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:234) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 在 java.util.concurrent.ThreadPoolExecutor$Worker .run(ThreadPoolExecutor.java:641) 在 java.lang.Thread.run(Thread.java:764)234) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 在 java.lang.Thread.run(Thread.java :764)234) 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 在 java.lang.Thread.run(Thread.java :764)

我显示图像的代码 -

Glide.with(view).setDefaultRequestOptions(new RequestOptions().timeout(30*1000)).load(imageUrl).placeholder(R.drawable.classroom).into(imageView);

我的 glide 版本是'com.github.bumptech.glide:glide:4.11.0' 我的 firebase 设置和依赖项是最新且正确的。任何人都可以为此提出解决方案吗?

4

0 回答 0