title: Update / migration - Admob play service Ads 19.8.0
body: <p>I have updated to the new version of com.google.android.gms: <strong>play-services-ads: 19.8.0</strong> from Admob, but I can't get it to work.</p>
  <p>I have read to migrate from version 19.7.0 of google play service ads.
  <a href="https://developers.google.com/admob/android/migration" rel="nofollow noreferrer">https://developers.google.com/admob/android/migration</a>
  I have tried my code in different ways and it does not work.</p>
  <p>One of the errors is: 'com.google.android.gms.ads.InterstitialAd' is deprecated  → I have solved it with an import com.google.android.gms.ads.interstitial.InterstitialAd;</p>
  <p>After importing .... InterstitialAd I got different errors such as:</p>
  <p>Cannot resolve method 'setAdUnitId' in 'InterstitialAd'</p>
  <p>Cannot resolve method 'loadAd' in 'InterstitialAd'</p>
  <p>Cannot resolve method 'isLoaded' in 'InterstitialAd'</p>
  <p>Example of my code: (works in older versions)</p>
  <pre><code>package com.ejemplo.mejorar;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.content.Intent;
  import android.view.View;
  import android.widget.LinearLayout;
  import com.google.android.gms.ads.interstitial.InterstitialAd;
  //import com.google.android.gms.ads.InterstitialAd;
  import com.google.android.gms.ads.AdRequest;
  import com.google.android.gms.ads.AdSize;
  import com.google.android.gms.ads.AdView;
  
  
  
  public class MainActivity extends Activity {
  
  
      //Variables code admob Ads &amp; interstitial//
      private InterstitialAd interstitialAd = null;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(com.ejemplo.mejorar.R.layout.activity_main);
  
  
          //Interstitial -------------
  
          AdRequest adrequest_interstitial = new AdRequest.Builder().build();
          interstitialAd = new InterstitialAd(this);
          interstitialAd.setAdUnitId(&quot;CODEADMOB&quot;);
          interstitialAd.loadAd(adrequest_interstitial);
  
      }
  
      //Inicio paginas----------------------------------------------------
      public void page1(View view)
      {
  
  
          Intent i = new Intent (this, PaginaConf.class);
          startActivity(i);
  
          int randomAd = (int)(Math.random()*10);
          if(interstitialAd!=null &amp;&amp; randomAd&lt;=1)
          {
              if(interstitialAd.isLoaded()){ interstitialAd.show(); }
  
          }
  
  
      }
  
  
      //---------------------------------------------
  
      public void close(View view)
      {
          finish();
      }
  
  
  
  }
  </code></pre>
  <p>Does anyone know how to solve the problem?</p>
  <p>I'm a little lost hehe</p>
  <p>thank you and sorry for my english</p>