Ads are not displaying after publishing final appl

2019-02-20 21:48发布

问题:

I had a game which I designed using libgdx.

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.

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 ?

回答1:

Test Ad working fine but not getting live Ads.

Follow these steps :

  1. Wait for some times/hours.

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

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

  4. Make sure that you properly set up a payment system and/or verified your PIN? If they are not done, then live ads would not be served from your account.
  5. Still problem now you need to post your problem in this group for assistance.


回答2:

  1. Check to make sure that your AdUnitID is correct
  2. Sometimes there might be no ads for some weird reason.
  3. If it is the first time(first app with AdMob), it might take some time before they start appearing. -> This Happened to me