title: Null LinearLayout?
body: <p>I'm trying to use a LinearLayout for implementing ads on mobile devices, because I saw it used in a tutorial put up by Google. However, my LinearLayout keeps returning null, and I haven't been able to find a solution for a long time. </p>
  
  <p>Here is my MainActivity.java:</p>
  
  <pre><code>package com.me.mygdxgame;
  
  
  import android.os.Bundle;
  import android.widget.LinearLayout;
  //import android.widget.RelativeLayout;
  
  //import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
  import com.badlogic.gdx.backends.android.AndroidApplication;
  import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
  import com.google.android.gms.ads.AdRequest;
  import com.google.android.gms.ads.AdSize;
  import com.google.android.gms.ads.AdView;
  //import com.google.ads.AdSize;
  //import com.google.ads.AdView;
  import com.me.mygdxgame.R;
  
  public class MainActivity extends AndroidApplication {
  
      AdView adView;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
          cfg.useGL20 = true;
  
          initialize(new MyGame(), cfg);
  
          adView = new AdView(this);
          adView.setAdSize(AdSize.BANNER);
          adView.setAdUnitId("XXXXConfidential Ad Unit IDXXXX");
  
          LinearLayout layout = (LinearLayout) findViewById(R.id.normal);
  //      layout.addView(adView);
          if (layout ==null){
              System.out.println("layout doesn't work");
          }
          if (layout !=null){
              System.out.println("layout works");
          }
          if (adView == null){
              System.out.println("adView doesn't work");
          }
          if (adView != null){
              System.out.println("adView works");
          }
  
          AdRequest adRequest = new AdRequest.Builder()
          .addTestDevice("XXXXConfidential Test Device CodeXXXXXXX")
          .build();
  
          if (adRequest == null){
              System.out.println("adRequest doesn't work");
          }
          if (adRequest != null){
              System.out.println("adRequest works");
          }
  
          adView.loadAd(adRequest);
  //      setContentView(layout);
      }
  
      public void onDestroy(){
          if (adView != null) {
              adView.destroy();
            }
            super.onDestroy();
      }
  }
  </code></pre>
  
  <p>The <code>System.out.println</code>s are telling me that everything works except for the <code>layout</code></p>
  
  <p>Here's my 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"
      android:id="@+id/normal"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here's a snippet from my R.java file, in my package:</p>
  
  <pre><code>public static final class id {
      public static final int hybrid=0x7f050004;
      public static final int none=0x7f050000;
      public static final int normal=0x7f050001;
      public static final int satellite=0x7f050002;
      public static final int terrain=0x7f050003;
  }
  public static final class integer {
      public static final int google_play_services_version=0x7f070000;
  }
  public static final class layout {
      public static final int main=0x7f030000;
  }
  </code></pre>
  
  <p>I'm not familiar at all with XML, so I don't know what the problem is. I've followed all of the tutorials very closely, yet my <code>layout</code> is still returning null. Any help? I've been trying to solve it for more than 24 hours...</p>