gpt4 book ai didi

android - 为什么我的应用程序在使用 Admob 和 Firebase 时会崩溃?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:18:14 27 4
gpt4 key购买 nike

我在 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

最佳答案

Android 9.0 最终默认删除了旧 Apache HTTP 库的所有痕迹。然而,似乎有些图书馆需要它。您需要将其添加到 <application> 内的 list 中元素:

<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

关于android - 为什么我的应用程序在使用 Admob 和 Firebase 时会崩溃?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55598500/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com