title: Android: AdMob not working
body: <p>AdMob won't show in my app. Every time I invoke <code>loadAd(..)</code> I get the following errors:</p>
  
  <blockquote>
    <p>Requesting resource 0x7f0b000e failed because it is complex. The Google
    Play services resources were not found. Check your project configuration to ensure that the resources are included.
    There was a problem getting an ad response. ErrorCode: 1</p>
  </blockquote>
  
  <p>I searched hours for a solution to this problem but haven't found anything that works for me! I downloaded the latest version of the <code>Google Play Services</code> and added them as library in my project preferences</p>
  
  <p>Here is my code:
  Activity:</p>
  
  <pre><code>public class WelcomeActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          this.setContentView(R.layout.activity_welcome);
  
          // Look up the AdView as a resource and load a request.
          AdView adView = (AdView) this.findViewById(R.id.welcomeAdView);
  
          AdRequest.Builder adRequestBuilder = new AdRequest.Builder();
          adRequestBuilder.addTestDevice("************"); 
          adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
          AdRequest adRequest = adRequestBuilder.build();
          adView.loadAd(adRequest);
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Layout xml:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:ads="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res/xx.xx"
      android:id="@+id/container"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      tools:context="xx.xx.WelcomeActivity" &gt;
  
  .... other layout stuff .....
  
  &lt;RelativeLayout
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:layout_alignParentBottom="true" &gt;
  
      &lt;com.google.android.gms.ads.AdView
          android:id="@+id/welcomeAdView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          ads:adSize="BANNER"
          ads:adUnitId="pub-***************" /&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>AndroidManifest.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="xx.xx"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
      &lt;uses-sdk
          android:minSdkVersion="14"
          android:targetSdkVersion="19" /&gt;
  
      &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@drawable/icon"
          android:label="@string/app_name"
          android:theme="@android:style/Theme.Holo.Light" &gt;
          &lt;meta-data
              android:name="com.google.android.gms.version"
              android:value="@integer/google_play_services_version" /&gt;
  
          &lt;activity
              android:name="xx.xx.WelcomeActivity"
              android:label="@string/app_name"
              android:screenOrientation="portrait" &gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          ... some more activities ...
          &lt;activity
              android:name="com.google.android.gms.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" &gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>