Getting a weird ClassNotFoundException in ac.loadC

2019-04-15 17:32发布

问题:

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)

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.

I'm currently using the version 16.0.0 of play services ads

implementation 'com.google.android.gms:play-services-ads:16.0.0'

回答1:

It appears there's a temporary workaround while we wait for this to be officially fixed from Google. Maps library is also affected.

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.



回答2:

As you say this is almost certainly an AdMob problem. They might be aware of it already, but with this sort of issue it is good to contact AdMob customer support, and then they can route the issue to the AdMob developers. It is very unlikely to be your fault.

You could do this on this page or in this form or