致命异常:java.util.NoSuchElementException

时间:2018-06-25 11:59:06

标签: java android

okhttp3.internal.connection.RouteSelector.next (RouteSelector.java:78)
okhttp3.internal.connection.StreamAllocation.findConnection (StreamAllocation.java:171)
okhttp3.internal.connection.StreamAllocation.findHealthyConnection (StreamAllocation.java:121)
okhttp3.internal.connection.StreamAllocation.newStream (StreamAllocation.java:100)
okhttp3.internal.connection.ConnectInterceptor.intercept (ConnectInterceptor.java:42)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:67)
okhttp3.internal.cache.CacheInterceptor.intercept (CacheInterceptor.java:93)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:67)
okhttp3.internal.http.BridgeInterceptor.intercept (BridgeInterceptor.java:93)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept (RetryAndFollowUpInterceptor.java:120)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:92)
okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:67)
okhttp3.RealCall.getResponseWithInterceptorChain (RealCall.java:185)
okhttp3.RealCall$AsyncCall.execute (RealCall.java:135)
okhttp3.internal.NamedRunnable.run (NamedRunnable.java:32)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
java.lang.Thread.run (Thread.java:818)

我在布料中遇到此问题,但我的测试电话从未发生过此事,请帮助我解决此问题

1 个答案:

答案 0 :(得分:1)

更新您的proguard

-dontwarn okio.** 
-dontnote retrofit2.Platform 
-dontwarn retrofit2.Platform$Java8 
-keepattributes Signature 
-keepattributes Exceptions 
-keep class com.myownpackage.models.** { *; }

在此处查看更多信息。 https://github.com/square/okhttp/issues/3308