title: AdMob findViewById returns null
body: <p>I'm trying to configure AdMod in my first Android project. When I try to run the app, findViewByID always returns null.</p>
  
  <p>Here's the code of my main activity:</p>
  
  <pre><code>import android.app.Activity;
  import android.content.Context;
  import android.content.res.Configuration;
  import android.graphics.Bitmap;
  import android.graphics.Bitmap.Config;
  import android.os.Bundle;
  import android.os.PowerManager;
  import android.os.PowerManager.WakeLock;
  import android.view.Window;
  
  
     import android.view.WindowManager;
  
  public abstract class MyAndroidApp extends Activity {
      AdView adView;
      public static final  String MY_PUBLISHER_ID = "***********";
  
   @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
      AdRequest adRequest = new AdRequest();
      adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
      adView = new AdView(this, AdSize.BANNER, MY_PUBLISHER_ID);
  
      //R.id.main has value, I can see it in Eclipse
      RelativeLayout mainLayout = (RelativeLayout) findViewById(R.id.main);
  
  
      if ( mainLayout == null )
          Log.d("Error","Layout is null");
      else
      mainLayout.addView(adView);
  
      adView.loadAd(adRequest);
  </code></pre>
  
  <p>The XML File (under res\layout) has the following:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".MyApp"     
      android:id="@+id/main"&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
          android:text="@string/hello_world" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>When I debug, I can see value for R.id.main. However, the value of mainLayout is still null.</p>
  
  <p>Thanks in advance.</p>