Tofira
Tofira

Reputation: 1634

Admob problem - Android

I'm building an Android app. I'm trying to use Admob, but I have some problems with it. I followed the guide on their sites, and looked for answers in the web, but couldn't find an answer.

My problem is that I can't see any ads. In the log I see the following -

04-22 16:47:06.660: INFO/Ads(28251): onFailedToReceiveAd(No ad to show.)

I see this message both in test mode in and regular mode. I can see test ads in the emulator though.

Thanks!

Upvotes: 0

Views: 1634

Answers (2)

user912806
user912806

Reputation: 21

In your main.xml, add:

<com.google.ads.AdView android:id="@+id/ad"
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       ads:adSize="BANNER"
                       ads:adUnitId="a14ed7ed1b71bc0"
                       ads:testDevices="TEST_EMULATOR,TEST_DEVICE_ID_GOES_HERE"
                       ads:loadAdOnCreate="true"/>

and in your manifest add into application tag:

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

Your app must includes Google AdMob Ads Sdk 431.jar

Upvotes: 1

james
james

Reputation: 26271

If there is no Ad to show, there is no ad to show. this doesn't mean it isn't working. AdMob does not always show ads, there has to be something available. if it is working on the emulator, you have successfully implemented AdMob into your application.

Upvotes: 3

Related Questions