Gradle升级后Koush ION崩溃

时间:2020-10-24 09:22:39

标签: android ion-koush

在Gradle升级后,当尝试发送非常简单的请求时,ION给了我这个错误。 它给我在AVD和物理设备上的相同错误。现在,我回避了升级升级的错误。 可能导致以下错误的原因是什么?

2020-10-24 12:34:14.275 20605-20647/my.example.project E/AndroidRuntime: FATAL EXCEPTION: ion-ion
Process: my.example.project, PID: 20605
java.lang.AssertionError
    at com.koushikdutta.async.AsyncSSLSocketWrapper.write(AsyncSSLSocketWrapper.java:474)
    at com.koushikdutta.async.AsyncSSLSocketWrapper.handleHandshakeStatus(AsyncSSLSocketWrapper.java:378)
    at com.koushikdutta.async.AsyncSSLSocketWrapper.handshake(AsyncSSLSocketWrapper.java:182)
    at com.koushikdutta.async.http.AsyncSSLSocketMiddleware.tryHandshake(AsyncSSLSocketMiddleware.java:89)
    at com.koushikdutta.async.http.AsyncSSLSocketMiddleware$2.onConnectCompleted(AsyncSSLSocketMiddleware.java:106)
    at com.koushikdutta.async.http.AsyncSocketMiddleware.lambda$getSocket$3$AsyncSocketMiddleware(AsyncSocketMiddleware.java:217)
    at com.koushikdutta.async.http.-$$Lambda$AsyncSocketMiddleware$glazjOxu-iNIRY4N890Wl1ngyGo.onCompleted(Unknown Source:12)
    at com.koushikdutta.async.future.SimpleFuture.lambda$setCallback$0(SimpleFuture.java:216)
    at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$h_gK5Y1XHZI1H8JTE2xOg4dXbp8.onCompleted(Unknown Source:2)
    at com.koushikdutta.async.future.SimpleFuture$FutureCallsite.loop(SimpleFuture.java:130)
    at com.koushikdutta.async.future.SimpleFuture.handleCallbackUnlocked(SimpleFuture.java:153)
    at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:195)
    at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:175)
    at com.koushikdutta.async.future.-$$Lambda$VNAuWcttAhMr3VsWCERbmWE6yR0.success(Unknown Source:2)
    at com.koushikdutta.async.future.SimpleFuture.lambda$success$4(SimpleFuture.java:287)
    at com.koushikdutta.async.future.-$$Lambda$SimpleFuture$DxIsaj7NQi76eWgOKS4iviWPLV0.onCompleted(Unknown Source:4)
    at com.koushikdutta.async.future.SimpleFuture$FutureCallsite.loop(SimpleFuture.java:130)
    at com.koushikdutta.async.future.SimpleFuture.handleCallbackUnlocked(SimpleFuture.java:153)
    at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:195)
    at com.koushikdutta.async.future.SimpleFuture.setComplete(SimpleFuture.java:182)
    at com.koushikdutta.async.http.-$$Lambda$cBC5du-82c5EcL72rP5wNK7Y2Y4.onConnectCompleted(Unknown Source:2)
    at com.koushikdutta.async.AsyncServer.runLoop(AsyncServer.java:906)
    at com.koushikdutta.async.AsyncServer.run(AsyncServer.java:727)
    at com.koushikdutta.async.AsyncServer.access$800(AsyncServer.java:46)
    at com.koushikdutta.async.AsyncServer$8.run(AsyncServer.java:681)

在此库的问题列表中找不到相同的错误。

2 个答案:

答案 0 :(得分:4)

您是否尝试过以下操作:https://github.com/koush/ion/issues/937

Solution 1:
Go to: File > Invalidate Caches/Restart and select Invalidate and Restart

Solution 2:
Go to: Build > Select Build Variant and select release instead of debug

答案 1 :(得分:1)

我的回答有点晚了,但如果有人仍在寻找解决方案,只需在 app.gradle 文件中将 Ion 版本更新为 3.1.0 并它应该修复崩溃。

implementation 'com.koushikdutta.ion:ion:3.1.0'