Siva K
Siva K

Reputation: 4968

admob cannot be viewed in android

i tried using Admob in my app by running it in a device and it showed nothing and i found the followig errors in logcat

04-07 10:49:05.570: ERROR/Ads(1084): AdView missing required XML attribute adUnitId. 04-07 10:49:07.850: ERROR/Ads(1084): Could not find com.google.ads.AdActivity, please make sure it is registered in AndroidManifest.xml.

But in manifest file i have mentioned the following lines {<meta-data android:value="axxxxxxxxxxxxxxxx" android:name="ADMOB_PUBLISHER_ID"/> <activity android:name="com.google.ads.AdMobActivity"/>}

What is my error...

I have totally 4 Activities in my App and i am trying to add the admob in my 4th activity. whether i have to add the above said lines with that activity or anything else pls help me friends...

Upvotes: 1

Views: 2565

Answers (1)

Siva K
Siva K

Reputation: 4968

The error shown can be fixed by adding the following to the manifest file:

<activity android:name="com.google.ads.AdActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:configChanges="orientation|keyboard|keyboardHidden" />

Upvotes: 10

Related Questions