android admob拒绝对先前失败的类java.lang.Class <uo>进行重新初始化:java.lang.NoClassDefFoundError eror

时间:2018-12-03 06:02:37

标签: android admob

任何时候都没有admob广告出现时,我会收到此错误消息。

解决方法是什么?

在我的记忆中,该广告最初正常显示,但从没出现过。

受测设备的Android版本为8.0.0、8.1.0。

MainActivity.java:432 => MobileAds.initialize("~");

我同时检查了App ID和Unit ID。

-- I/zygote64: Rejecting re-init on previously-failed class java.lang.Class<uO>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/TracingController;
-- I/zygote64:     at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
-- I/zygote64:     at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
-- I/zygote64:     at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:128)
-- I/zygote64:     at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:402)
-- I/zygote64:     at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:194)
-- I/zygote64:     at android.webkit.WebViewFactoryProvider android.webkit.WebView.getFactory() (WebView.java:2530)
-- I/zygote64:     at void android.webkit.WebView.ensureProviderCreated() (WebView.java:2525)
-- I/zygote64:     at void android.webkit.WebView.setOverScrollMode(int) (WebView.java:2590)
-- I/zygote64:     at void android.view.View.<init>(android.content.Context) (View.java:4865)
-- I/zygote64:     at void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int) (View.java:5040)
-- I/zygote64:     at void android.view.ViewGroup.<init>(android.content.Context, android.util.AttributeSet, int, int) (ViewGroup.java:597)
-- I/zygote64:     at void android.widget.AbsoluteLayout.<init>(android.content.Context, android.util.AttributeSet, int, int) (AbsoluteLayout.java:55)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:643)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:588)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:571)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:558)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context) (WebView.java:548)
-- I/zygote64:     at void com.google.android.gms.ads.internal.webview.v.<init>(com.google.android.gms.ads.internal.webview.au, com.google.android.gms.ads.internal.webview.av, java.lang.String, boolean, nb, com.google.android.gms.ads.internal.util.client.p, com.google.android.gms.ads.internal.csi.l, com.google.android.gms.ads.internal.bo, com.google.android.gms.ads.internal.v, com.google.android.gms.ads.internal.clearcut.a) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):1)
-- I/zygote64:     at java.lang.Object com.google.android.gms.ads.internal.webview.q.call() ((null):4)
-- I/zygote64:     at java.lang.Object com.google.android.gms.ads.internal.util.bp.a(java.util.concurrent.Callable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):19)
-- I/zygote64:     at com.google.android.gms.ads.internal.webview.i com.google.android.gms.ads.internal.webview.o.a(android.content.Context, com.google.android.gms.ads.internal.webview.av, java.lang.String, boolean, boolean, nb, com.google.android.gms.ads.internal.util.client.p, com.google.android.gms.ads.internal.csi.l, com.google.android.gms.ads.internal.bo, com.google.android.gms.ads.internal.v, com.google.android.gms.ads.internal.clearcut.a) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):7)
-- I/zygote64:     at void com.google.android.gms.ads.internal.js.p.<init>(android.content.Context, com.google.android.gms.ads.internal.util.client.p, nb) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):5)
-- I/zygote64:     at void com.google.android.gms.ads.internal.js.y.run() ((null):17)
-- I/zygote64:     at void com.google.android.gms.ads.internal.util.future.ad.execute(java.lang.Runnable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):4)
-- I/zygote64:     at com.google.android.gms.ads.internal.js.ap com.google.android.gms.ads.internal.js.x.a(nb) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):13)
-- I/zygote64:     at com.google.android.gms.ads.internal.js.al com.google.android.gms.ads.internal.js.x.a() (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):23)
-- I/zygote64:     at com.google.android.gms.ads.internal.util.future.x com.google.android.gms.ads.internal.js.function.b.b(java.lang.Object) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):7)
-- I/zygote64:     at void com.google.android.gms.ads.internal.ac.a(android.content.Context, com.google.android.gms.ads.internal.util.client.p, boolean, com.google.android.gms.ads.internal.state.e, java.lang.String, java.lang.String, java.lang.Runnable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):28)
-- I/zygote64:     at void com.google.android.gms.ads.internal.ac.a(android.content.Context, com.google.android.gms.ads.internal.util.client.p, java.lang.String, java.lang.Runnable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):4)
-- I/zygote64:     at void com.google.android.gms.ads.nonagon.z.a(java.lang.String, xl) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):53)
-- I/zygote64:     at boolean com.google.android.gms.ads.internal.client.be.a(int, android.os.Parcel, android.os.Parcel) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):32)
-- I/zygote64:     at boolean og.onTransact(int, android.os.Parcel, android.os.Parcel, int) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):4)
-- I/zygote64:     at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:635)
-- I/zygote64:     at void com.google.android.gms.internal.ads.zzew.zza(int, android.os.Parcel) ((null):20)
-- I/zygote64:     at void com.google.android.gms.internal.ads.zzye.zza(java.lang.String, com.google.android.gms.dynamic.IObjectWrapper) ((null):26)
-- I/zygote64:     at void com.google.android.gms.internal.ads.zzzc.zza(android.content.Context, java.lang.String, com.google.android.gms.internal.ads.zzzf) ((null):26)
-- I/zygote64:     at void com.google.android.gms.ads.MobileAds.initialize(android.content.Context, java.lang.String, com.google.android.gms.ads.MobileAds$Settings) ((null):5)
-- I/zygote64:     at void com.google.android.gms.ads.MobileAds.initialize(android.content.Context, java.lang.String) ((null):1)
-- I/zygote64:     at void --.MainActivity.setAdmob() (MainActivity.java:432)
-- I/zygote64:     at void --.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:123)
-- I/zygote64:     at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7258)
-- I/zygote64:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7249)
-- I/zygote64:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1221)
-- I/zygote64:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2927)
-- I/zygote64:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3059)
-- I/zygote64:     at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
-- I/zygote64:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1724)
-- I/zygote64:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
-- I/zygote64:     at void android.os.Looper.loop() (Looper.java:164)
-- I/zygote64:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7002)
-- I/zygote64:     at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
-- I/zygote64:     at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:441)
-- I/zygote64:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1408)
-- I/zygote64: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.TracingController" on path: DexPathList[[zip file "/data/app/com.android.chrome-BKniZXieiVCfB0bUvlePJA==/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-BKniZXieiVCfB0bUvlePJA==/lib/arm64, /data/app/com.android.chrome-BKniZXieiVCfB0bUvlePJA==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
-- I/zygote64:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:125)
-- I/zygote64:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
-- I/zygote64:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
-- I/zygote64:     at java.lang.Class java.lang.Class.classForName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:-2)
-- I/zygote64:     at java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (Class.java:453)
-- I/zygote64:     at java.lang.Class android.webkit.WebViewFactory.getWebViewProviderClass(java.lang.ClassLoader) (WebViewFactory.java:128)
-- I/zygote64:     at java.lang.Class android.webkit.WebViewFactory.getProviderClass() (WebViewFactory.java:402)
-- I/zygote64:     at android.webkit.WebViewFactoryProvider android.webkit.WebViewFactory.getProvider() (WebViewFactory.java:194)
-- I/zygote64:     at android.webkit.WebViewFactoryProvider android.webkit.WebView.getFactory() (WebView.java:2530)
-- I/zygote64:     at void android.webkit.WebView.ensureProviderCreated() (WebView.java:2525)
-- I/zygote64:     at void android.webkit.WebView.setOverScrollMode(int) (WebView.java:2590)
-- I/zygote64:     at void android.view.View.<init>(android.content.Context) (View.java:4865)
-- I/zygote64:     at void android.view.View.<init>(android.content.Context, android.util.AttributeSet, int, int) (View.java:5040)
-- I/zygote64:     at void android.view.ViewGroup.<init>(android.content.Context, android.util.AttributeSet, int, int) (ViewGroup.java:597)
-- I/zygote64:     at void android.widget.AbsoluteLayout.<init>(android.content.Context, android.util.AttributeSet, int, int) (AbsoluteLayout.java:55)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:643)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:588)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:571)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:558)
-- I/zygote64:     at void android.webkit.WebView.<init>(android.content.Context) (WebView.java:548)
-- I/zygote64:     at void com.google.android.gms.ads.internal.webview.v.<init>(com.google.android.gms.ads.internal.webview.au, com.google.android.gms.ads.internal.webview.av, java.lang.String, boolean, nb, com.google.android.gms.ads.internal.util.client.p, com.google.android.gms.ads.internal.csi.l, com.google.android.gms.ads.internal.bo, com.google.android.gms.ads.internal.v, com.google.android.gms.ads.internal.clearcut.a) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):1)
-- I/zygote64:     at java.lang.Object com.google.android.gms.ads.internal.webview.q.call() ((null):4)
-- I/zygote64:     at java.lang.Object com.google.android.gms.ads.internal.util.bp.a(java.util.concurrent.Callable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):19)
-- I/zygote64:     at com.google.android.gms.ads.internal.webview.i com.google.android.gms.ads.internal.webview.o.a(android.content.Context, com.google.android.gms.ads.internal.webview.av, java.lang.String, boolean, boolean, nb, com.google.android.gms.ads.internal.util.client.p, com.google.android.gms.ads.internal.csi.l, com.google.android.gms.ads.internal.bo, com.google.android.gms.ads.internal.v, com.google.android.gms.ads.internal.clearcut.a) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):7)
-- I/zygote64:     at void com.google.android.gms.ads.internal.js.p.<init>(android.content.Context, com.google.android.gms.ads.internal.util.client.p, nb) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):5)
-- I/zygote64:     at void com.google.android.gms.ads.internal.js.y.run() ((null):17)
-- I/zygote64:     at void com.google.android.gms.ads.internal.util.future.ad.execute(java.lang.Runnable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):4)
-- I/zygote64:     at com.google.android.gms.ads.internal.js.ap com.google.android.gms.ads.internal.js.x.a(nb) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):13)
-- I/zygote64:     at com.google.android.gms.ads.internal.js.al com.google.android.gms.ads.internal.js.x.a() (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):23)
-- I/zygote64:     at com.google.android.gms.ads.internal.util.future.x com.google.android.gms.ads.internal.js.function.b.b(java.lang.Object) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):7)
-- I/zygote64:     at void com.google.android.gms.ads.internal.ac.a(android.content.Context, com.google.android.gms.ads.internal.util.client.p, boolean, com.google.android.gms.ads.internal.state.e, java.lang.String, java.lang.String, java.lang.Runnable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):28)
-- I/zygote64:     at void com.google.android.gms.ads.internal.ac.a(android.content.Context, com.google.android.gms.ads.internal.util.client.p, java.lang.String, java.lang.Runnable) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):4)
-- I/zygote64:     at void com.google.android.gms.ads.nonagon.z.a(java.lang.String, xl) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):53)
-- I/zygote64:     at boolean com.google.android.gms.ads.internal.client.be.a(int, android.os.Parcel, android.os.Parcel) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):32)
-- I/zygote64:     at boolean og.onTransact(int, android.os.Parcel, android.os.Parcel, int) (:com.google.android.gms.dynamite_adsdynamite@14574048@14.5.74 (040400-219897028):4)
-- I/zygote64:     at boolean android.os.Binder.transact(int, android.os.Parcel, android.os.Parcel, int) (Binder.java:635)
-- I/zygote64:     at void com.google.android.gms.internal.ads.zzew.zza(int, android.os.Parcel) ((null):20)
-- I/zygote64:     at void com.google.android.gms.internal.ads.zzye.zza(java.lang.String, com.google.android.gms.dynamic.IObjectWrapper) ((null):26)
-- I/zygote64:     at void com.google.android.gms.internal.ads.zzzc.zza(android.content.Context, java.lang.String, com.google.android.gms.internal.ads.zzzf) ((null):26)
-- I/zygote64:     at void com.google.android.gms.ads.MobileAds.initialize(android.content.Context, java.lang.String, com.google.android.gms.ads.MobileAds$Settings) ((null):5)
-- I/zygote64:     at void com.google.android.gms.ads.MobileAds.initialize(android.content.Context, java.lang.String) ((null):1)
-- I/zygote64:     at void --.MainActivity.setAdmob() (MainActivity.java:432)
-- I/zygote64:     at void --.MainActivity.onCreate(android.os.Bundle) (MainActivity.java:123)
-- I/zygote64:     at void android.app.Activity.performCreate(android.os.Bundle, android.os.PersistableBundle) (Activity.java:7258)
-- I/zygote64:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:7249)
-- I/zygote64:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1221)
-- I/zygote64:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2927)
-- I/zygote64:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3059)
-- I/zygote64:     at void android.app.ActivityThread.-wrap11(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1)
-- I/zygote64:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1724)
-- I/zygote64:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:106)
-- I/zygote64:     at void android.os.Looper.loop() (Looper.java:164)
-- I/zygote64:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:7002)
-- I/zygote64:     at java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) (Method.java:-2)
-- I/zygote64:     at void com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run() (RuntimeInit.java:441)
-- I/zygote64:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1408)

build.gradle文件。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "--"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.android.gms:play-services-ads:17.1.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'com.android.support:design:26.1.0'
}

0 个答案:

没有答案