Dushyant Patel
Dushyant Patel

Reputation: 685

Admob is not able to load any ads

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.

Upvotes: 0

Views: 5403

Answers (5)

user1691916
user1691916

Reputation: 1

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"

Upvotes: 0

yacine
yacine

Reputation: 11

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

Upvotes: 1

Dhruvit Darji
Dhruvit Darji

Reputation: 215

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

Upvotes: 0

Szymon
Szymon

Reputation: 43023

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.

Upvotes: 2

Renaud FAVIER
Renaud FAVIER

Reputation: 1

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

Upvotes: 0

Related Questions