title: Error inflating class com.google.android.gms.ads.AdView Android Studio
body: <p>I'm going crazy.</p>
  
  <p>I'm trying to change admob using google play services. But i'm stuck on this error.</p>
  
  <pre><code>Caused by: android.view.InflateException: Binary XML file line #53: Error inflating class com.google.android.gms.ads.AdView
  </code></pre>
  
  <p>i've this:</p>
  
  <pre><code>&lt;com.google.android.gms.ads.AdView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="5dp"
      android:id="@+id/adViewPers"/&gt;
  </code></pre>
  
  <p>and this:</p>
  
  <pre><code>&lt;meta-data android:name="com.google.android.gms.version"
                 android:value="@integer/google_play_services_version"/&gt;
  &lt;activity
          android:name="com.google.android.gms.ads.AdActivity"
          android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" /&gt;
  </code></pre>
  
  <p>main activity</p>
  
  <pre><code>import com.google.android.gms.ads.AdRequest;
  import com.google.android.gms.ads.AdSize;
  import com.google.android.gms.ads.AdView;
  
  ...
  private AdView adViewPers;
  
  ...
  
  adViewPers = (AdView) findViewById(R.id.adViewPers);
  adViewPers.setAdUnitId("xxxxxxx");
  adViewPers.setAdSize(AdSize.SMART_BANNER);
  AdRequest adRequest = new AdRequest.Builder().build();
  adViewPers.loadAd(adRequest);
  </code></pre>
  
  <p>and in dependencies:</p>
  
  <p><img src="https://i.stack.imgur.com/Bl1ha.png" alt="enter image description here"></p>
  
  <p>what i'm doing wrong????</p>