赶上所有AdMob崩溃?

时间:2019-06-10 10:45:14

标签: android admob

适用于Android的AdMob负责我所有应用程序中超过90%的崩溃和ANR。早在几年前,所有此类崩溃都已报告给AdMob,尽管有所有变通办法和更新,但崩溃仍然不断出现。有时将解决一个崩溃问题,但将其替换为ANR。有时候,一切都会正常进行,然后有一天我会崩溃数百次。

我确定AdMob团队无法修复所有问题的原因是什么,但是我的应用程序有一种聪明的方法来捕获由AdMob插件引起的所有崩溃吗?

一个例子:

Fatal Exception: java.util.concurrent.TimeoutException: com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize() timed out after 10 seconds
       at com.google.android.gms.ads.internal.webview.j.k(j.java:3)
       at com.google.android.gms.ads.internal.webview.v.destroy(v.java:4)
       at com.google.android.gms.ads.internal.webview.t.destroy(t.java:10)
       at com.google.android.gms.ads.nonagon.ad.interstitial.b.finalize(b.java:2)
       at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:217)
       at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:200)
       at java.lang.Thread.run(Thread.java:818)

另一个:

Caused by java.lang.IllegalStateException: Only fullscreen activities can request orientation
       at android.os.Parcel.readException(Parcel.java:1975)
       at android.os.Parcel.readException(Parcel.java:1913)
       at android.app.IActivityManager$Stub$Proxy.setRequestedOrientation(IActivityManager.java:6186)
       at android.app.Activity.setRequestedOrientation(Activity.java:5840)
       at com.google.android.gms.ads.internal.overlay.zzd.close(zzd.java:146)
       at com.google.android.gms.ads.internal.overlay.zzd.zznh(zzd.java:166)
       at com.google.android.gms.ads.internal.overlay.zzd.close(zzd.java:61)
       at com.google.android.gms.ads.internal.overlay.client.c.a(c.java:33)
       at og.onTransact(og.java:4)
       at android.os.Binder.transact(Binder.java:612)
       at com.google.android.gms.internal.ads.zzej.transactAndReadExceptionReturnVoid(zzej.java:7)
       at com.google.android.gms.internal.ads.zzaar.onCreate(zzaar.java:8)
       at com.google.android.gms.ads.AdActivity.onCreate(AdActivity.java:29)
       at android.app.Activity.performCreate(Activity.java:7183)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
       at android.app.ActivityThread.-wrap11(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6944)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

另一个:

Caused by java.lang.ClassNotFoundException: Didn't find class "org.apache.http.ProtocolVersion" on path: DexPathList[[zip file "/data/user_de/0/com.google.android.gms/app_chimera/m/00000099/dl-AdsFdrDynamite.integ_20290000008.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/00000099/n/armeabi-v7a, /data/user_de/0/com.google.android.gms/app_chimera/m/00000099/n/armeabi, /system/lib]]
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
       at ab.loadClass(ab.java:4)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
       at ly.b(ly.java:2)
       at lx.a(lx.java:1)
       at lz.a(lz.java:29)
       at com.google.android.gms.ads.internal.util.aq.a(aq.java:10)
       at lc.a(lc.java:8)
       at lc.run(lc.java:2)

很明显,我不在乎在这种情况下是否不会显示广告,我只是不希望我的应用程序中的大部分工作都与AdMob接触,而且我不希望AdMob降低我的Android生命。我会选择其他广告提供商,但我不知道他们是否也会遇到这些问题(我不知道为什么他们不会)。

0 个答案:

没有答案