Create AdView in main.xml
<p>I have been trying to follow the google instructions
and create my Ab Banner in the main.xml</p>

<p>I have added the following code below into the layout</p>

<pre><code>&lt;com.google.ads.AdView 
 android:id="@+id/adView"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 ads:adUnitId="a14df3a26341a7c"
 ads:adSize="BANNER"
 ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID"
 ads:loadAdOnCreate="true"
 /&gt;
</code></pre>

<p>And in my Activity i am using</p>

<pre><code>// Look up the AdView as a resource and load a request.
    AdView adView = (AdView)this.findViewById(R.id.adView);
    adView.loadAd(new AdRequest());
</code></pre>

<p>But it is saying it cannot resolve (R.id.adView)</p>

<p>ANy Ideas? Am i missing something silly.
The main.xml has no errors?</p>

<p>Here is the Full main.xml....</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:background="@color/background" 
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:padding="20dip"
android:orientation="horizontal" &gt; 

&lt;com.google.ads.AdView 
                     android:id="@+id/adView"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     ads:adUnitId="a14df3a26341a7c"
                     ads:adSize="BANNER"                       
                     ads:loadAdOnCreate="true"
                     /&gt;


&lt;LinearLayout
android:orientation="vertical"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:layout_gravity="center"
&gt;


&lt;TextView  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_gravity="center"
android:text="@string/main_title"
android:layout_marginBottom="2dip"
android:textSize="20sp" 
/&gt;
&lt;TextView  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_gravity="center"
android:text="@string/web_page"
android:layout_marginBottom="5dip"
/&gt;  
&lt;Button
android:id="@+id/continue_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label"
/&gt;
&lt;Button
android:id="@+id/help_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/help_label"
/&gt;
&lt;Button
android:id="@+id/about_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/about_label"
/&gt;
&lt;Button
android:id="@+id/exit_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/exit_label"
android:layout_marginBottom="2dip"
/&gt;  
&lt;TextView  
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_gravity="center"
android:text="@string/copyright"
/&gt;  
&lt;/LinearLayout&gt;
&lt;/LinearLayout&gt;
</code></pre>
