Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weird error with NoClassDefFoundError in com.google.android.gms.ads.internal.util.aq.a

Tags:

I have got a weird crash report on my google console which seems to be related with google ad module. Here is a stack trace reported on Google Console.

java.lang.NoClassDefFoundError: 
  at jp.b (com.google.android.gms.dynamite_adsdynamite@[email protected] (100400-223214910):3)
  at jo.a (com.google.android.gms.dynamite_adsdynamite@[email protected] (100400-223214910):3)
  at jq.a (com.google.android.gms.dynamite_adsdynamite@[email protected] (100400-223214910):19)
  at com.google.android.gms.ads.internal.util.aq.a (com.google.android.gms.dynamite_adsdynamite@[email protected] (100400-223214910):15)
  at iu.a (com.google.android.gms.dynamite_adsdynamite@[email protected] (100400-223214910):19)
  at iu.run (com.google.android.gms.dynamite_adsdynamite@[email protected] (100400-223214910):8)
Caused by: java.lang.ClassNotFoundException: 
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:134)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:379)
  at ad.loadClass (com.google.android.gms.dynamite_dynamiteloader@[email protected] (100400-223214910):4)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

This exception seems to be happened only on Android 9 devices. And I don't have got any clue about why this could happen.

I just want to know if there has been any update related with this ad module as per android 9.

like image 806
Doctiger Avatar asked Dec 15 '18 14:12

Doctiger


1 Answers

Try changing your target API to 27, or:

Specify requirement for Apache HTTP Legacy library If your app is targeting API level 28 (Android 9.0) or above, you must include the following declaration within the element of AndroidManifest.xml.

  <uses-library
      android:name="org.apache.http.legacy"
      android:required="false" />

Sources:

https://groups.google.com/forum/#!topic/google-admob-ads-sdk/K1HKru7RutY

https://developers.google.com/maps/documentation/android-sdk/config#specify_requirement_for_apache_http_legacy_library

like image 118
live-love Avatar answered Oct 16 '22 22:10

live-love