发布最终应用程序后未显示广告

Ads are not displaying after publishing final application(发布最终应用程序后未显示广告)

本文介绍了发布最终应用程序后未显示广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 libgdx 设计的游戏.

I had a game which I designed using libgdx.

在我用这段代码测试它之前,它在 Google Play 上发布之前正在展示广告:

It was displaying ads before publishing it on Google Play as I tested it by this code:

adView = new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId(AD_UNIT_ID);
AdRequest adRequest = new AdRequest.Builder().addTestDevice(TEST_DEVICE).build();
adView.loadAd(adRequest);

在发布游戏之前,我将我的一些代码行更改为:

Before publishing the game I changed some lines of my code to be like this:

adView = new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId(AD_UNIT_ID);
AdRequest.Builder builder = new AdRequest.Builder();
adView.loadAd(builder.build());

但它现在没有显示广告.

but it shows no ads now.

我的代码是否有问题,或者可能是我最近第一次创建的 admob 或 adsense 帐户?

Is there a problem in my code or it may be in my admob or adsense accounts which I have recently made for the first time ?

推荐答案

测试广告工作正常,但没有获得实时广告.

Test Ad working fine but not getting live Ads.

按照以下步骤操作:

  1. 等待一段时间/几小时.

  1. Wait for some times/hours.

如果您能够加载测试广告但不能加载实时广告,这听起来像是您的 AdMob 帐户有问题.

If you're able to load test ads but not live ads, It sounds like an issue with your AdMob account.

等待仍有问题后,您需要从 AdMob 帐户中交叉检查 Ad unit Id 和 AppId.

After waiting still having problem then you need to cross check Ad unit Id and AppId from AdMob account.

这篇关于发布最终应用程序后未显示广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:发布最终应用程序后未显示广告

基础教程推荐