0

I have a very basic android activity with just the following xml code, and permissions to access internet/network state in my manifest, but im still getting the following error:

09-20 15:58:00.896: WARN/Ads(748): Invalid adSize parameter in XML layout: -1. Defaulting to BANNER. 09-20 15:58:00.906: ERROR/Ads(748): AdView missing required XML attribute adUnitId.

heres my xml:

<?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
          android:orientation="vertical"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent">
  <com.google.ads.AdView android:id="@+id/adView"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     ads:adUnitId="a14e7524ca3db03"
                     ads:adSize="BANNER"
                     ads:loadAdOnCreate="true"/>

jfisk
  • 6,125
  • 20
  • 77
  • 113

1 Answers1

1

Take a look at my question a while ago: AdMob: Missing required XML attribute adUnitID

I found out that the correct line should be:

xmlns:ads="http://schemas.android.com/apk/res/com.niek.runningapp"

So try something similar for your app.

Community
  • 1
  • 1
nhaarman
  • 98,571
  • 55
  • 246
  • 278