当我更新Android应用程序以支持API 28时,该应用程序在运行Android 9的设备中崩溃,这是错误消息:
Fatal Exception: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion;
at lt.b(:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2)
at ls.a(:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:1)
at lu.a(:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:18)
at com.google.android.gms.ads.internal.util.ar.a(:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:10)
at kx.a(:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:7)
at kx.run(:com.google.android.gms.policy_ads_fdr_dynamite@30000@30000.238272502.238272502:2) in firebase Crashlytics
如何解决这个问题?
答案 0 :(得分:0)
Apache HTTP客户端弃用
在Android 6.0中,我们删除了对Apache HTTP客户端的支持。 从Android 9开始,该库已从引导类路径中删除,并且默认情况下不适用于应用程序。
要继续使用Apache HTTP客户端,面向Android 9及更高版本的应用可以将以下内容添加到其AndroidManifest.xml中:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
https://developer.android.com/about/versions/pie/android-9.0-changes-28