7

after immigrating my Admob to Google Play Services. I always get this error code

AdRequest.ERROR_CODE_NO_FILL

Here is explanation:

ERROR_CODE_NO_FILL The ad request was successful, but no ad was returned due to lack of ad inventory.

And I think it was implemented successful and I waited so long time (3 days) but no Ads return instead of empty space T.T

enter image description here

Here are my code details:

    <LinearLayout
        android:id="@+id/ad_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"

    </LinearLayout>

adLayout = (LinearLayout) view.findViewById(R.id.ad_layout);

    adView = new AdView(getActivity());
    adView.setAdUnitId(Config.AD_PUBLISH_KEY);
    adView.setAdSize(AdSize.SMART_BANNER);
    adLayout.addView(adView);
    AdRequest adRequest = new AdRequest.Builder()
    .build();
    adView.loadAd(adRequest);
03-09 12:46:50.765: I/Ads(2453): Use AdRequest.Builder.addTestDevice("28F0E937BC5EDD2ED24E3F7540AE8251") to get test ads on this device.
03-09 12:46:50.765: I/Ads(2453): Starting ad request.
03-09 12:46:50.867: W/ResourceType(2453): getEntry failing because entryIndex 13 is beyond type entryCount 8
03-09 12:46:50.867: W/ResourceType(2453): Failure getting entry for 0x7f0c000d (t=11 e=13) in package 0 (error -2147483647)
03-09 12:46:50.867: E/GooglePlayServicesUtil(2453): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
03-09 12:46:51.265: I/Ads(2453): No fill from ad server.
03-09 12:46:51.265: W/Ads(2453): Failed to load ad: 3

It 's looked good but no Ads return, but when I extracted Admob code to new clean Android project, It worked fine, I think it is configuration problem, any helps are highly appreciated :D

Tai Tran
  • 1,406
  • 3
  • 15
  • 27

4 Answers4

4

Thank for your attention and help.

I found that if I modify the package id, the Ads show, It probably was added to Admob blacklist, so not any Ads return, I also attach my code to prove my statement, again thank you all

Tai Tran

Tai Tran
  • 1,406
  • 3
  • 15
  • 27
0

You should make sure you have setup your Android Application properly with Ads, go over the following steps and ensure that you have done them correctly.

  1. GoogleAdMob Jar in your libs folder
  2. GoogleAdMob Activity in your manifest
  3. GoogleAd AdView in your main activity XML file, with your adunitId correctly inputted
  4. And Ensure your class in which your AdMob is coded in is correct.

Let me know if these steps help you or not.


I don't see your adunitId that may be the problem.

Green
  • 126
  • 5
0

From what I understand this is caused by the server not returning ads. This probably isn't something that can be prevented with code in your app, but have you configured it for testing?

adRequest.setTesting(true);
tpbapp
  • 2,506
  • 2
  • 19
  • 21
0

It looks AdMobs simply cannot supply your application with enough ads. They are out of ads inventory. Here is their explanation on what happens and how you can increase the fill rate. Hope this helps.

sergej shafarenka
  • 20,071
  • 7
  • 67
  • 86