5

I'm having some strange problems with starting with AdMobs.

FIRST PROBLEM

When I try to add my banner by this code:

        layout = (RelativeLayout) findViewById(R.id.adprincipal);
    adView = new AdView(this);
    adView.setAdUnitId("my unit id");
    adView.setAdSize(AdSize.BANNER);
    AdRequest adRequest = new AdRequest.Builder()  
    .addTestDevice("my device")  
    .build();
    // Load the adView with the ad request.
    adView.loadAd(adRequest);
    layout.addView(adView);

I don't get anything if I set the size AdSize.SMART_BANNER but I get a test banner with AdSize.BANNER but ANYWAY (even BANNER and SMART_BANNER) this is what I get from LogCat:

WHEN BANNER

12-30 04:41:00.380: W/ResourceType(27407): getEntry failing because entryIndex 13 is beyond type entryCount 5

12-30 04:41:00.380: W/ResourceType(27407): Failure getting entry for 0x7f0b000d (t=10 e=13) in package 0 (error -2147483647)

12-30 04:41:00.380: E/GooglePlayServicesUtil(27407): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

12-30 04:41:00.400: W/ResourceType(27407): getEntry failing because entryIndex 13 is beyond type entryCount 5

12-30 04:41:00.400: W/ResourceType(27407): Failure getting entry for 0x7f0b000d (t=10 e=13) in package 0 (error -2147483647)

12-30 04:41:00.400: E/GooglePlayServicesUtil(27407): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

12-30 04:41:02.111: I/GATE(27407): DEV_ACTION_COMPLETED

12-30 04:41:02.111: I/Ads(27407): Ad finished loading.

WHEN SMART_BANNER

12-30 04:48:27.476: W/ResourceType(29507): getEntry failing because entryIndex 13 is beyond type entryCount 5

12-30 04:48:27.476: W/ResourceType(29507): Failure getting entry for 0x7f0b000d (t=10 e=13) in package 0 (error -2147483647)

12-30 04:48:27.476: E/GooglePlayServicesUtil(29507): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

12-30 04:48:27.516: D/OpenGLRenderer(29507): Enabling debug mode 0

12-30 04:48:27.576: W/ResourceType(29507): getEntry failing because entryIndex 13 is beyond type entryCount 5

12-30 04:48:27.576: W/ResourceType(29507): Failure getting entry for 0x7f0b000d (t=10 e=13) in package 0 (error -2147483647)

12-30 04:48:27.576: E/GooglePlayServicesUtil(29507): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

12-30 04:48:31.450: I/Ads(29507): No fill from ad server.

12-30 04:48:31.450: W/Ads(29507): Failed to load ad: 3

12-30 04:48:31.450: E/SQLiteLog(29507): (14) cannot open file at line 30241 of [00bb9c9ce4]

12-30 04:48:31.450: E/SQLiteLog(29507): (14) os_unix.c:30241: (2) open(/NotificationPermissions.db) -

12-30 04:48:31.450: D/WebKit(29507): ERROR:

12-30 04:48:31.450: D/WebKit(29507): SQLite database failed to load from /NotificationPermissions.db

12-30 04:48:31.450: D/WebKit(29507): Cause - unable to open database file

12-30 04:48:31.450: D/WebKit(29507): external/webkit/Source/WebCore/platform/sql/SQLiteDatabase.cpp(71) : bool WebCore::SQLiteDatabase::open(const WTF::String&, bool)

and the SMART BANNER doesn't load

SECOND PROBLEM

I got the same errors than "BANNER" setting an INTERSTITIAL, but it also finally loads...

What's wrong??

I've tried: this, this and this I have reinstalled my library, downloaded the lastet, deleted and reinstalled... etcetera.

Thanks.

Community
  • 1
  • 1
Rafael Ruiz Muñoz
  • 5,333
  • 6
  • 46
  • 92

2 Answers2

11

On emulator change following:

AdRequest adRequest = new AdRequest.Builder()  
    .addTestDevice("my device")  
    .build();

to

AdRequest request = new AdRequest.Builder()
        .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)        // All emulators
        .addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB")  // Emulator id you will get in the LogCat verbose
        .build();
       adView.loadAd(request);

On real device:

adView.loadAd(new AdRequest.Builder().build());

Also, check on your Ad server (most problably AdMob), if the Ad for your ad_unit_id has BANNER, SMART BANNER and INTERSTITIAL enabled.

Tabrej Khan
  • 894
  • 6
  • 15
  • Now suddenly it works also for SMART_BANNER but the errors are coming on anyway. I checked on AdMobs and it's counting impressions as well. – Rafael Ruiz Muñoz Dec 31 '13 at 01:12
  • Thank you so much. The BANNER settings where wrong on AdMob site –  Aug 22 '14 at 11:15
  • Tasty I'm facing same issue, sometime SMART_BANNER isn't loading in landscape mode, I implemented recommended answer but issue isn't resolved to me. furthermore I cant find any setting for SMART_BANNER on AdMob site, could you highlight which setting you followed? – Aqib Mumtaz Oct 09 '14 at 14:42
0

You can safely ignore this message. This is written in the Google Mobile Ads SDK FAQ.

See this link

xcesco
  • 4,690
  • 4
  • 34
  • 65