我在Google Play上发布了一个应用。然后,我将其链接到Admob,该应用程序开始工作,向我展示了admob的旗帜。有时,在启动时会崩溃,有时不会崩溃。我查看了Android Studio Logcat,这是错误。有人可以帮我吗?
Process: it.bluebait.mycurrency, PID: 13200
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)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/dl-AdsFdrDynamite.integ_30000000.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/n/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ac.loadClass(:com.google.android.gms.dynamite_dynamiteloader@16089081@16.0.89 (100400-239467275):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
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)
2019-04-09 19:43:27.941 15295-15544/? E/AndroidRuntime: FATAL EXCEPTION: Thread-10
Process: it.bluebait.mycurrency, PID: 15295
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)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/dl-AdsFdrDynamite.integ_30000000.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/0000001f/n/arm64-v8a, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:169)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at ac.loadClass(:com.google.android.gms.dynamite_dynamiteloader@16089081@16.0.89 (100400-239467275):4)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
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)
2019-04-09 19:43:27.953 563-563/? E/SELinux: avc: denied { find } for service=opdiagnose pid=15295 uid=10236 scontext=u:r:untrusted_app:s0:c236,c256,c512,c768 tcontext=u:object_r:opdiagnose_service:s0 tclass=service_manager permissive=0
2019-04-09 19:43:27.956 563-563/? E/SELinux: avc: denied { find } for service=opdiagnose pid=15295 uid=10236 scontext=u:r:untrusted_app:s0:c236,c256,c512,c768 tcontext=u:object_r:opdiagnose_service:s0 tclass=service_manager permissive=0
答案 0 :(得分:8)
最终,默认情况下,Android 9.0最终删除了旧Apache HTTP库的所有痕迹。但是,似乎有些库需要它。您需要将其添加到<application>
元素内的清单中:
<uses-library
android:name="org.apache.http.legacy"
android:required="false"/>
来源:https://developer.android.com/about/versions/pie/android-9.0-changes-28#apache-p
答案 1 :(得分:-2)
i建议您将依赖关系更新到最新版本。 classpath'com.google.gms:google-services:4.0.1'