Crashlytics报告错误的行号

时间:2018-11-05 08:21:24

标签: android google-fabric

在过去的几周里,我在导入语句行中看到很多行号崩溃的情况。

例如,此堆栈跟踪在第2行发生崩溃

Fatal Exception: java.lang.IllegalArgumentException: Unexpected TLS version: NONE
   at okhttp3.TlsVersion.forJavaName(TlsVersion.java:2)
   at okhttp3.Handshake.get(Handshake.java:4)
   at okhttp3.internal.connection.RealConnection.connectTls(RealConnection.java:12)
   at okhttp3.internal.connection.RealConnection.establishProtocol(RealConnection.java:4)
   at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:13)
   at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:25)
   at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:1)
   at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:5)
   at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:5)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:1)
   at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:22)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:1)
   at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:22)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
   at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:5)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:10)
   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:1)

有人找到解决方案吗?

2 个答案:

答案 0 :(得分:1)

我通过将这些规则添加到我的proguard配置中来修复了该问题

https://docs.fabric.io/android/crashlytics/dex-and-proguard.html

答案 1 :(得分:0)

使用版本3.10.0。

避免使用无效的HTTPS会话。这样可以防止OkHttp因错误Unexpected TLS version: NONE而崩溃。

来源:https://square.github.io/okhttp/changelog_3x/