【发布时间】:2018-06-08 22:25:11
【问题描述】:
if (myApp.finterstitialAd3 == null) {
myApp.finterstitialAd3 = new com.facebook.ads.InterstitialAd(this, getResources().getString(R.string.finterstitial3));
}
if (!myApp.finterstitialAd3.isAdLoaded()) {
myApp.finterstitialAd3.loadAd();
}
java.lang.RuntimeException:无法启动活动 ComponentInfo{}:java.lang.IllegalStateException:InterstitialAd 在显示时无法加载。确保您的适配器调用了 adapterListener.onInterstitialDismissed()。 在 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2678) 在 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2743) 在 android.app.ActivityThread.-wrap12(ActivityThread.java) 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1490) 在 android.os.Handler.dispatchMessage(Handler.java:102) 在 android.os.Looper.loop(Looper.java:154) 在 android.app.ActivityThread.main(ActivityThread.java:6165) 在 java.lang.reflect.Method.invoke(本机方法) 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888) 在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778) 原因:java.lang.IllegalStateException:InterstitialAd 在显示时无法加载。确保您的适配器调用了 adapterListener.onInterstitialDismissed()。 在 com.facebook.ads.InterstitialAd.a(未知来源) 在 com.facebook.ads.InterstitialAd.loadAd(未知来源) 在 com.facebook.ads.InterstitialAd.loadAd(未知来源) 在 "------------".loadInterstitial(VideoDetail.java:121) 在“-------”.onCreate(VideoDetail.java:225) 在 android.app.Activity.performCreate(Activity.java:6687) 在 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1140) 在 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2631) 在 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2743) 在 android.app.ActivityThread.-wrap12(ActivityThread.java) 在 android.app.ActivityThread$H.handleMessage(ActivityThread.java:1490) 在 android.os.Handler.dispatchMessage(Handler.java:102) 在 android.os.Looper.loop(Looper.java:154) 在 android.app.ActivityThread.main(ActivityThread.java:6165) 在 java.lang.reflect.Method.invoke(本机方法) 在 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:888) 在 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:778)
【问题讨论】:
标签: android facebook interstitial