Admob插页式广告显示黑屏 [英] Admob insterstitial display a black screen

查看:95
本文介绍了Admob插页式广告显示黑屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,当我使用admob显示插页式广告时,出现黑屏.这是我正在谈论的屏幕:

Lately I am getting black screens when displaying Interstitial ads using admob. This is the screen I am talking about:

有时候效果很好,并且可以正确显示广告.这是我使用的代码:

Some time it works well and displays an ad correctly. This is the code I use:

    Class variable:
    private InterstitialAd oInterstitialAd=null;

    In the activity onCreate:
    oInterstitialAd = new InterstitialAd(this);
    oInterstitialAd.setAdUnitId(xxxxxxx);
    oInterstitialAd.setAdListener(new AdListener()
    {  @Override public void onAdLoaded() 
       {  oInterstitialAd.show();
          finish();
       }
       @Override public void onAdFailedToLoad(int errorCode) 
       {  LogError("onAdFailedToLoad " + errorCode);              
          finish();
       }
    });        
    AdRequest oAdRequest = new AdRequest.Builder().build();
    oInterstitialAd.loadAd(oAdRequest);

谢谢

推荐答案

我遇到了同样的问题.

通过在设备和wifi网络之间切换进行检查.多数情况下,这是Google已将其添加到临时黑名单中的wifi问题.

Check by switching between devices and wifi networks. Mostly its the problem of your wifi which the google has added to the temporary blacklist.

如果可以在其他设备或其他网络上使用.广告问题与设备或网络问题无关.

If it works on other devices or other networks. It's not the issue with ads its problem with device or network.

这篇关于Admob插页式广告显示黑屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆