0

Admob is not able to load ads into my app. I have been waiting for a while, and still there is no ad.

   <com.google.ads.AdView android:id="@+id/adView"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     ads:adUnitId="pub-||||||||||||||||" \\ blanked out. 
                     ads:adSize="BANNER"
                     ads:testDevices="TEST_EMULATOR, 20080411413fc082"
                     ads:loadAdOnCreate="true"/>

My Manifest

 <activity android:name="com.google.ads.AdActivity"
                android:configChanges="keyboard|keyboardHidden|orientation
|screenLayout|uiMode|screenSize|smallestScreenSize"/>

LogCAT

10-06 20:43:28.187: W/Ads(11465): Invalid unknown request error: Cannot determine request type. Is your ad unit id correct?
10-06 20:38:52.937: E/ActivityThread(11465): Failed to find provider info for com.google.plus.platform

Image

Image to show that I have admob jar in libs.

enter image description here

Any help is appreciated.

Thank you.

Dushyant Patel
  • 687
  • 8
  • 20

5 Answers5

2

You're using a wrong value in adUnitId. It's not your publisher ID, it's a separate number called Ad Unit ID.

In Admob, go to Monetise, All Apps, and expand "View code integration instructions" for your app. If it's not there, you have to add your app.

Szymon
  • 42,577
  • 16
  • 96
  • 114
1

finally this problem resolved for me ..... downgrade from 19 to 17 and upgrade from 3 to 13 like this :

android:minSdkVersion="13"
android:targetSdkVersion="17"

do more tests by the adv you get the ads

yacine
  • 11
  • 1
0

Did you forget permissions ?

 <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  • the target SDK should be at least API 13
0

see... you first have to download your jar file from admob account for your application then do use the in your project and in Xml file mention that unitId which you have found from this way.. To get your admob ad unit id go to your admob account and click on Sites & Apps and then click the manage button underneath the app you are working with. You'll see the Publisher ID for the app on the details page. This is the Ad Unit ID. copy this to your xml file

Dhruvit Darji
  • 205
  • 2
  • 14
0

after august 1 2014, admob updated the legacy ad nit id, we need to update to latest. Admob ad unit id will be in this format ca-app-pub-XxxXXXXXXXXXXXX/XXXXXXXXXXX"