由AdMob SDK引起的NoClassDefFoundError

时间:2019-01-06 11:35:08

标签: android sdk admob

在我的Android应用中实施AdMob SDK后,某些用户遇到了由NoClassDefFoundError引起的崩溃。

什么原因导致此问题,以及如何解决?

我已经完全按照this page所述实现了SDK。

等级依赖性:

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    implementation 'com.android.support:support-media-compat:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.google.android.gms:play-services-ads:17.1.2'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

堆栈跟踪:

java.lang.NoClassDefFoundError: 
  at jp.b (com.google.android.gms.dynamite_adsdynamite@14799082@14.7.99 (100406-223214910):3)
  at jo.a (com.google.android.gms.dynamite_adsdynamite@14799082@14.7.99 (100406-223214910):3)
  at jq.a (com.google.android.gms.dynamite_adsdynamite@14799082@14.7.99 (100406-223214910):19)
  at com.google.android.gms.ads.internal.util.aq.a (com.google.android.gms.dynamite_adsdynamite@14799082@14.7.99 (100406-223214910):15)
  at iu.a (com.google.android.gms.dynamite_adsdynamite@14799082@14.7.99 (100406-223214910):19)
  at iu.run (com.google.android.gms.dynamite_adsdynamite@14799082@14.7.99 (100406-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@14799082@14.7.99 (100406-223214910):4)
  at java.lang.ClassLoader.loadClass (ClassLoader.java:312)

0 个答案:

没有答案