在 ac.loadClass 中得到一个奇怪的 ClassNotFoundException [英] Getting a weird ClassNotFoundException in ac.loadClass
问题描述
我在 Google Play 上有一个有效的应用.我的用户经常遇到我不知道在哪里调试的崩溃.
I have an active app on Google Play. My users are often experiencing a crash that I can't figure out where to debug.
java.lang.NoClassDefFoundError:
at jl.b (jl.java:3)
at jk.a (jk.java:3)
at jm.a (jm.java:18)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:17)
at ip.a (ip.java:19)
at ip.run (ip.java:8)
Caused by: java.lang.ClassNotFoundException:
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
at ac.loadClass (ac.java:4)
at java.lang.ClassLoader.loadClass (ClassLoader.java:312)
at jl.b (jl.java:3)
at jk.a (jk.java:3)
at jm.a (jm.java:18)
at com.google.android.gms.ads.internal.util.ap.a (ap.java:17)
at ip.a (ip.java:19)
at ip.run (ip.java:8)
最后一部分让我觉得它与 AdMob 有关
The last portion makes me think it's related to AdMob
at com.google.android.gms.ads.internal.util.ap.a (ap.java:17)
但我无法弄清楚问题到底出在哪里.我的测试设备上的一切似乎都很好,但仍有其他用户遇到这些崩溃.
But I can't figure out where's exactly the problem. Everything on my test devices seem to be fine, but still other users are experiencing these crashes.
我已经上传了去混淆器文件,但是这些堆栈跟踪都被混淆了.
I've uploaded the de-obfuscator file, but these stack traces are all obfuscated.
我目前使用的是 16.0.0 版的播放服务广告
I'm currently using the version 16.0.0 of play services ads
implementation 'com.google.android.gms:play-services-ads:16.0.0'
推荐答案
在我们等待 Google 正式修复此问题时,似乎有一个临时解决方法.地图库也受到影响.
It appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.
只要把这个标签放到 Manifest 文件中:
Just put this tag into the Manifest file:
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
我试过了,它似乎工作正常.我将把它标记为答案,但当官方修复可用时,我会更新这篇文章.
I tried it and it appears to be working. I'm going to mark this as an answer but I'll update this post when an official fix will be available.
这篇关于在 ac.loadClass 中得到一个奇怪的 ClassNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!