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.
按照以下步骤操作:
等待一段时间/几小时.
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.
这篇关于发布最终应用程序后未显示广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:发布最终应用程序后未显示广告


- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- Android - 拆分 Drawable 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01