“No Ad Config.” on onAdFailedToLoad() Method While trying to Load Ads

Fixed It and it works.

Found a resource from google. And It cleared all my doubts. For Test Ad Resource Click Me

The Advertisement works in two ways.

  1. While The App Is In Development.
  2. While The App Is In Production.

Scenario 1: While the App Is In Devlopment

For this case, we need to use Test Advertisements. Admob and “com.google.android.gms.ads” doesnt allow user to use Advertisements in Development Phase due to false impressions.

To enable Test Advertisement. There are two ways:
You can either use google ad unit id’s which are available on the link adove.
Or
You can use your own ad unit id, but you will be needing to register your device as a test device and use your own request configuration.
Here is a simple Example:
Search for your “Device Id” In “Logcat”

It will look something like

I/ADS: Use Requested Configuration……Arrays.asList(“Your device Id will be here”);

Then Just Copy Paste This(i can read your mind..)

// Change your Id
RequestConfiguration configuration = new RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("your device id should go here")).build();
MobileAds.setRequestConfiguration(configuration);

Now just load the ad and it will pop up. Congratz. 🙂


Scenario 2: While the App Is In Production

This is pretty simple part…

  1. Just remove the .setTestDeviceIds(Arrays.asList(“your device id should go here”)) part from the code…
  2. Link your AdMob App to PlayStore. [Is your app published? Yes…yes…and on…]
  3. Just opt for ad.
  4. And check if Ads are enabled in your app settings on play console.
  5. It should work now. Congratz.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)