Hello I am trying to use Admob ads on my app but ads are not displaying. I am getting this error:
"Code": 3,
"Message": "No ad config.",
"Domain": "com.google.android.gms.ads",
"Cause": "null",
"Response Info": {
"Response ID": "null",
"Mediation Adapter Class Name": "",
"Adapter Responses": []
}
The same error occurs with test ids as well.
This is gradle implementation:
implementation 'com.google.firebase:firebase-ads:20.3.0'
implementation 'com.google.android.gms:play-services-ads:20.3.0'
I initialize ads like so:
MobileAds.initialize(this);
This is interstitial initialization:
adRequest = new AdRequest.Builder().build();
InterstitialAd.load(c,c.getString(R.string.popup), adRequest, new InterstitialAdLoadCallback() {
@Override
public void onAdLoaded(@NonNull InterstitialAd interstitialAd) {
mInterstitialAd = interstitialAd;
}
@Override
public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {
mInterstitialAd = null;
}
});