title: AdMob adverts not showing in Emulator - Android App
body: <p>I have been trying to get AdMob adverts to show in the Android app emulator. I am using Eclipse, and when I click on the "Graphical Design" it shows a white rectangle (where the advert would be) and says "Ads by Google".</p>
  
  <p>However, when I run the advert on the Emulator, no advert appears.</p>
  
  <p>I followed the guide on the Google development pages word for word and I thought it would work.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit: Here is my code:</p>
  
  <p>In XML:  </p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:ads="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/beach"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context=".MainActivity" &gt;
  
  &lt;com.google.android.gms.ads.AdView
      android:id="@+id/adView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:layout_marginBottom="16dp"
      ads:adSize="BANNER"
      ads:adUnitId="MY ADD ID (it's filled in in my code)" &gt;
  &lt;/com.google.android.gms.ads.AdView&gt;
  </code></pre>
  
  <p>In the activity:</p>
  
  <pre><code>import com.google.android.gms.ads.AdRequest;
  import com.google.android.gms.ads.AdView;
  
  public class MainActivity extends Activity {
  
  private static final String TEST_DEVICE_ID = "INSERT_YOUR_TEST_DEVICE_ID_HERE";
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      // The "loadAdOnCreate" and "testDevices" XML attributes no longer available.
      AdView adView = (AdView) this.findViewById(R.id.adView);
      AdRequest adRequest = new AdRequest.Builder()
      .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
      .addTestDevice("INSERT_YOUR_HASHED_DEVICE_ID_HERE")
  
          .build();
      adView.loadAd(adRequest);
  
  }
  </code></pre>