I'm setting an ad to my Android application using DoubleClick and can't manage to show the final ad, can someone help me?
When I test an ad by adding ".addTestDevice("xxx...")" I get the test ad but when I remove this line I get the following error :
W/Ads: No fill from ad server
W/Ads: Failed to load ad: 3
I set my ad like this :
PublisherAdRequest adRequest = new PublisherAdRequest.Builder().build();
mPublisherAdView.loadAd(adRequest);
And my publisherView look like this :
<com.google.android.gms.ads.doubleclick.PublisherAdView
android:id="@+id/pronostics_ad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
ads:adSize="BANNER"
ads:adUnitId="@string/ad_unit_pronostic">
</com.google.android.gms.ads.doubleclick.PublisherAdView>
What could be wrong?
Thank's in advance for your answers.
As per the Documentation you are getting the following error code:
Based on the post onFailedToReceiveAd - Ad request successful, but no ad returned due to lack of ad inventory when using admob with adwhirl:
There is one option which helped in our case. As @blizzard mentioned in your application settings in Google Developer Console there is a section which called "Pricing and Distribution". In this section there is a checkbox "CONTAINS ADS". In our case it was disabled. After enabling we successfully received ads. Hope it helps.
One new and update answer: Many apps that were removed this October(2018) for the lack of Privacy Policy are unable to receive ads after they get back in Play Store. You must use this form to request a "reset" for that app's ads. https://support.google.com/admob/contact/appeal_policy_violation
Took me a few days to realize and find the answer. Hope you get your ads back.
Option 1: Go to Settings-> search Reset advertising ID -> click on Reset advertising ID -> OK. You should start receiving Ads now
No search option? Try Option 2
Option 2: Go to Settings->Google->Ads->Reset advertising ID->OK
No Google options in Settings? Try Option 3
Option 3:Look for Google Settings (NOT THE SETTINGS)->Ads->Reset advertising ID
If error continues last try is create a new placement in admob. This works for me. Without changing anything(except placement id string) else in code ads start displaying.
This is a simple WORKAROUND (no solution):
You can install a mediation such as InMobi: https://developers.google.com/admob/android/mediation/inmobi
In this way, if for whatever reason admob is not showing you ads, you can still show them from other ad networks.