发布新更新后 AnroidRuntime 出现致命异常

Fatal Exception at AnroidRuntime after releasing new update

更新我的应用程序的新版本后,我在打开应用程序时反复遇到此错误崩溃,没有其他问题。在应用程序打开几秒钟后发生此崩溃。

错误日志:

E/AndroidRuntime: FATAL EXCEPTION: Thread-3
Process: com.company.app, PID: 13304
java.lang.NoSuchMethodError: No direct method <init>(Lorg/apache/http/c/c;Lorg/apache/http/conn/scheme/SchemeRegistry;)V in class Lorg/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager; or its super classes (declaration of 'org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager' appears in /system/framework/org.apache.http.legacy.boot.jar)
    at com.a.g.c.c(Unknown Source:54)
    at com.a.g.c.a(Unknown Source:4)
    at com.a.e.b.a(Unknown Source:0)
    at com.a.e.b.b(Unknown Source:23000)
    at com.a.d.b.c(Unknown Source:5000)
    at com.a.d.b.b(Unknown Source:0)
    at com.a.d.b.a(Unknown Source:4000)
    at com.a.c.f.a(Unknown Source:12000)
    at com.a.c.f.run(Unknown Source:4)
    at com.a.a.b.b.a(Unknown Source:8)
    at com.a.e.a(Unknown Source:51031)
    at com.a.e.a(Unknown Source:0)
    at com.a.e.run(Unknown Source:1000)
    at com.a.e.o(Unknown Source:31)
    at com.a.e.a(Unknown Source:45000)
    at com.a.c.a(Unknown Source:20)
    at com.a.c.b(Unknown Source:27000)
    at com.a.c.run(Unknown Source:7)
    at com.a.a.b.c.run(Unknown Source:8)
    at com.a.a.b.d.run(Unknown Source:2000)

此错误显示在 Logcat 未进入 Crashlytics。 出现这种情况的主要原因是什么以及如何解决这个问题?

What are the main causes of this happening and how to solve this problem?

这是因为您的 Apache 类 被 Proguard 混淆步骤剥离了。尝试为那些 apache 类 添加 -keep 选项。例如。

-keep class org.apache.http.** { *; }