My issue is that ads are not being displayed at all in my app, test mode or not. I am going to keep this question specific to test mode, and once I get that working I will w
In my case I found that my billing address was not verified and ads were blocked. Verify billing address it will automatically get fixed. https://www.google.com/adsense/
try this:
MobileAds.initialize(this, getString(R.string.admob_app_id));
AdView mAdView = findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
I had this issue as well today. My app was not suspended, but the apk name change did work. We had renamed a test app to release it to production; we changed the apk name as a result. This screwed up our ad fill on both MoPub and Admob.
In my case this was the error as result of requesting a geo-restricted ad from a region that's not supported for that ad. If I hardcoded the location for the ad request bundle to be inside the acceptable region, or not include a location in the request at all, the ad was rendered just fine; otherwise I had the same error as OP in console.
It might be because you're not waiting for the ad to load.
For me implementing the AdLoaded
method of the AdListener
did the job.
mAdInterstitial.loadAd(AdRequest.Builder().addTestDevice("XXXXXXX").build())
mAdInterstitial.adListener = object : AdListener() {
override fun onAdLoaded() {
mAdInterstitial.show()
}
}