gpt4 book ai didi

android - 将 AdColony 与中介集成时无法第二次加载广告

转载 作者:行者123 更新时间:2023-11-29 02:26:17 25 4
gpt4 key购买 nike

我已经通过 AdColony 的中介实现了 Admob 的奖励视频广告。广告加载正常,但当我更改设备方向或退出应用程序并返回时,广告无法加载,错误代码为 3,这是一个无填充错误。由于我使用的是测试广告,因此应该不会出现此错误。每次我重新安装该应用程序或在将其从最近的屏幕上滑出后打开它时,广告都会加载。

我在我的日志输出中得到以下内容:

08-25 16:26:09.966 21229-21229/com.appsbyusman.stealthaudioplayer W/Ads: Failed
java.lang.ClassCastException: com.jirbo.adcolony.AdColonyAdapter cannot be cast to com.google.android.gms.ads.mediation.OnContextChangedListener
at com.google.android.gms.internal.ads.zzyk.zzi(Unknown Source)
at com.google.android.gms.internal.ads.zzxr.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.ads.zzek.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at mt.b(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):20)
at com.google.android.gms.ads.internal.mediation.client.g.a(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):137)
at com.google.android.gms.ads.internal.reward.d.c(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):71)
at com.google.android.gms.ads.internal.reward.client.g.a(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):54)
at mu.onTransact(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):12)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.internal.ads.zzej.transactAndReadExceptionReturnVoid(Unknown Source)
at com.google.android.gms.internal.ads.zzahb.zze(Unknown Source)
at com.google.android.gms.internal.ads.zzahm.resume(Unknown Source)
at com.appsbyusman.stealthaudioplayer.DrawerAndFragmentActivity.onResume(DrawerAndFragmentActivity.java:920)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1258)
at android.app.Activity.performResume(Activity.java:6327)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3092)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3134)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2481)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

还有这个:

08-25 16:26:11.142 21229-21229/com.appsbyusman.stealthaudioplayer E/Ads: java.lang.NullPointerException: Attempt to invoke interface method 'void com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdListener.onAdLoaded(com.google.android.gms.ads.reward.mediation.MediationRewardedVideoAdAdapter)' on a null object reference
at com.jirbo.adcolony.AdColonyAdListener.notifyAdLoaded(AdColonyAdListener.java:164)
at com.jirbo.adcolony.AdColonyAdapter.loadAd(AdColonyAdapter.java:141)
at com.google.android.gms.internal.ads.zzyk.zza(Unknown Source)
at com.google.android.gms.internal.ads.zzyk.zzc(Unknown Source)
at com.google.android.gms.internal.ads.zzxr.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.ads.zzek.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at mt.b(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):20)
at com.google.android.gms.ads.internal.mediation.client.g.a(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):70)
at com.google.android.gms.ads.internal.reward.mediation.a.a(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):140)
at com.google.android.gms.ads.internal.reward.mediation.b.run(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):3)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
08-25 16:26:11.143 21229-21229/com.appsbyusman.stealthaudioplayer W/Ads: Fail to load ad from adapter.
android.os.RemoteException
at com.google.android.gms.internal.ads.zzyk.zza(Unknown Source)
at com.google.android.gms.internal.ads.zzyk.zzc(Unknown Source)
at com.google.android.gms.internal.ads.zzxr.dispatchTransaction(Unknown Source)
at com.google.android.gms.internal.ads.zzek.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at mt.b(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):20)
at com.google.android.gms.ads.internal.mediation.client.g.a(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):70)
at com.google.android.gms.ads.internal.reward.mediation.a.a(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):140)
at com.google.android.gms.ads.internal.reward.mediation.b.run(:com.google.android.gms.dynamite_adsdynamite@12874022@12.8.74 (040308-204998136):3)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
08-25 16:26:11.166 21229-21229/com.appsbyusman.stealthaudioplayer W/Ads: Failed to load ad: 3

上面堆栈跟踪中提到的行是这样的:

 @Override
public void onResume() {
mRewardedVideoAd.resume(DrawerAndFragmentActivity.this);
super.onResume();
}

我该怎么做才能解决这个问题?

最佳答案

请尝试更新到最新的 AdColony SDK v3.3.5。 ( https://github.com/AdColony/AdColony-Android-SDK-3 ) 如果您使用的是 AdMob 中介,请使用最新的 AdMob AdColony 适配器 v3.3.5.1。 ( https://bintray.com/google/mobile-ads-adapters-android/com.google.ads.mediation.adcolony/3.3.5.1 ) 另外,我建议使用 build.gradle 中的“com.google.android.gms:play-services-ads:15.0.1”。

关于android - 将 AdColony 与中介集成时无法第二次加载广告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52016912/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com