Admob Banner Ads Fail To Load, Error Code : 3 No Fill
Solution 1:
publicstaticfinalint ERROR_CODE_NO_FILL
The ad request was successful, but no ad was returned due to lack of ad inventory.
Constant Value: 3
Source: documentation https://developers.google.com/android/reference/com/google/android/gms/ads/AdRequest#ERROR_CODE_NO_FILL
There is nothing wrong with your code , the issue is admob doesnt always have Ad to return for your request possible reasons could be
-you have just registered your publisher id as it takes some time to start serving ads
-you have filtered some ads
Solution 2:
I've tried combination of devices running with different OS. Finally I got solution. I wrote this code when app was fail with error code 3 (No Fill Error)
<com.google.android.gms.ads.AdView
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
ads:adSize="SMART_BANNER"
ads:adUnitId="XXXXXXXXXXXXXXXX>
</com.google.android.gms.ads.AdView>
Now As per google sample code I've to use width with match_parent so I've changed width with match_parent still same error occurred. So finally I've change Size type with BANNER and now it run in all devices. (Google's demo code use BANNER type) I just tried this size and now all devices run ads banner. Not sure but as per my testing scenario ad was fail which device have large resolution (More than 16:9 ratio like 19:9 ratio 1080 x 2280 pixels) and After Set Banner size type as BANNER works fine with large resolution also.
Solution 3:
Check And Make sure You Have not linked two accounts to adsense as I have mistakenly done in my case.
if you are just creating your admob account waut for 24 hours and try again
share edit delete flag
Solution 4:
I was receiving the exact same message. The problem was that I was using a wrong test ad unit ID. The correct one is
ca-app-pub-3940256099942544/6300978111
Post a Comment for "Admob Banner Ads Fail To Load, Error Code : 3 No Fill"