与Admob广告有关的Android至关重要的崩溃事件

时间:2019-01-03 16:37:21

标签: c# android unity3d admob

将Unity升级到版本2018.3.0f2后,与广告相关的错误数量急剧增加。 Android的构建系统已更改为Gradle(内部以前已弃用)。例外示例:

java.lang.Error: FATAL EXCEPTION [Thread-326575]
Unity version     : 2018.3.0f2
Device model      : Xiaomi Redmi Note 5
Device fingerprint: xiaomi/whyred/whyred:8.1.0/OPM1.171019.011/V10.0.6.0.OEIMIFH:user/release-keys
Caused by
  at com.unity3d.player.ReflectionHelper.nativeProxyInvoke (Native Method)
  at com.unity3d.player.ReflectionHelper.a (Unknown Source)
  at com.unity3d.player.ReflectionHelper$1.invoke (Unknown Source:6)
  at java.lang.reflect.Proxy.invoke (Proxy.java:913)
  at $Proxy9.onAdFailedToLoad (Unknown Source)
  at com.google.unity.ads.RewardBasedVideo$1$1$2.run (RewardBasedVideo.java:89)
  at java.lang.Thread.run (Thread.java:764)

代理编号可能不同:$ Proxy9,$ Proxy10,$ Proxy12,$ Proxy13 除购买商品外,也存在类似的错误。

java.lang.Error: FATAL EXCEPTION [pool-2-thread-1]
Unity version     : 2018.3.0f2
Device model      : BQru BQru_BQru-5058
Device fingerprint: BQru/BQru-5058/BQru-5058:7.0/NRD90M/1494381105:user/release-keys
Caused by
  at com.unity3d.player.ReflectionHelper.nativeProxyInvoke (Native Method)
  at com.unity3d.player.ReflectionHelper.a (Unknown Source)
  at com.unity3d.player.ReflectionHelper$1.invoke (Unknown Source)
  at java.lang.reflect.Proxy.invoke (Proxy.java:813)
  at $Proxy7.OnProductsRetrieved (Unknown Source)
  at com.unity.purchasing.common.UnityPurchasing.OnProductsRetrieved (UnityPurchasing.java:24)
  at com.unity.purchasing.googleplay.GooglePlayPurchasing.NotifyUnityOfProducts (GooglePlayPurchasing.java:572)
  at com.unity.purchasing.googleplay.GooglePlayPurchasing.access$1000 (GooglePlayPurchasing.java:43)
  at com.unity.purchasing.googleplay.GooglePlayPurchasing$5.onQueryInventoryFinished (GooglePlayPurchasing.java:531)
  at com.unity.purchasing.googleplay.IabHelper$4.workWith (IabHelper.java:862)
  at com.unity.purchasing.googleplay.BillingServiceManager$2.run (BillingServiceManager.java:146)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1133)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:607)
  at java.lang.Thread.run (Thread.java:761)

我使用文档中的代码,在过渡到新版本的Unity之前,一切正常,没有错误。

我尝试为Unity安装不同版本的AdMob插件,不同的解析器,在Unity中添加和删除服务。

现在在我的Unity 2018.3.0f2中: -API最低等级:16 -API目标级别:最高安装级别(级别28,当时为27) -脚本运行时版本:.NET 4.x(原为3.5,现已弃用) -Google移动广告Unity插件v3.15.1

通过SDK Manager安装在系统中: -Android SDK平台工具28.0.1 -Android SDK工具26.1.1 -Google Play服务49版

不幸的是,我无法在本地设备上重复此类崩溃,在Android 5.0及更高版本中,这种情况发生在大约2%的用户中。

更新: 我确信此错误与插件的AdMob版本和“其他”有关。目前,我能够将错误数量减少10-30次。我重新安装了Windows和所有软件,最后我离开了AdMob插件版本3.14,其余部分则如上所述。现在,我有一个新的致命异常(下面的示例),但是对于1000个玩家,它会发生1-2次,这是可以容忍的。

java.lang.Error: FATAL EXCEPTION [main]
Unity version     : 2018.3.0f2
Device model      : samsung SM-G570F
Device fingerprint: samsung/on5xeltejv/on5xelte:8.0.0/R16NW/G570FXXU1CRK1:user/release-keys
Caused by
  at com.unity3d.player.ReflectionHelper.nativeProxyInvoke (Native Method)
  at com.unity3d.player.ReflectionHelper.a (Unknown Source)
  at com.unity3d.player.ReflectionHelper$1.invoke (Unknown Source:6)
  at java.lang.reflect.Proxy.invoke (Proxy.java:913)
  at $Proxy10.onAdFailedToLoad (Unknown Source)
  at com.google.unity.ads.Interstitial$1$1.onAdFailedToLoad (Interstitial.java:75)
  at com.google.android.gms.internal.ads.zzjf.onAdFailedToLoad (Unknown Source:2)
  at com.google.android.gms.internal.ads.zzki.dispatchTransaction (Unknown Source:29)
  at com.google.android.gms.internal.ads.zzek.onTransact (Unknown Source:22)
  at android.os.Binder.transact (Binder.java:612)
  at oe.b (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):15)
  at com.google.android.gms.ads.internal.client.ac.a (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):6)
  at com.google.android.gms.ads.internal.a.a (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):335)
  at com.google.android.gms.ads.internal.a.a (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):331)
  at com.google.android.gms.ads.internal.a.b (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):140)
  at com.google.android.gms.ads.internal.c.b (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):44)
  at com.google.android.gms.ads.internal.j.run (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):2)
  at android.os.Handler.handleCallback (Handler.java:789)
  at android.os.Handler.dispatchMessage (Handler.java:98)
  at ze.a (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):5)
  at com.google.android.gms.ads.internal.util.e.a (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):5)
  at ze.dispatchMessage (com.google.android.gms.dynamite_adsdynamite@14799046@14.7.99 (040306-223214910):4)
  at android.os.Looper.loop (Looper.java:164)
  at android.app.ActivityThread.main (ActivityThread.java:6942)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

0 个答案:

没有答案