title: How to use admob using capacitor in Ionic?
body: <p>I have problems with admob-free plugin. I executed these command in a ionic 4 project:</p>
  
  <pre><code>    ionic start myapp sidemenu
      ionic capacitor add android 
      ionic cordova plugin add cordova-plugin-admob-free  --save --variable ADMOB_APP_ID="myadmobid"
      npm install @ionic-native/admob-free
      Ionic capacitor sync android 
      ionic capacitor run android 
  </code></pre>
  
  <p>when I test the program on my device android studio shows the next error and the app stop.</p>
  
  <pre><code> FATAL EXCEPTION: main
      Process: com.danieltrevino.myapp, PID: 29617
      java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzur;
          at com.google.android.gms.ads.BaseAdView.&lt;init&gt;(Unknown Source:3)
          at com.google.android.gms.ads.AdView.&lt;init&gt;(Unknown Source:1)
          at name.ratson.cordova.admob.banner.BannerExecutor$1.run(BannerExecutor.java:70)
          at android.os.Handler.handleCallback(Handler.java:873)
          at android.os.Handler.dispatchMessage(Handler.java:99)
          at android.os.Looper.loop(Looper.java:280)
          at android.app.ActivityThread.main(ActivityThread.java:6706)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
       Caused by: java.lang.ClassNotFoundException: com.google.android.gms.internal.zzur
          at java.lang.VMClassLoader.findLoadedClass(Native Method)
          at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:312
  </code></pre>
  
  <p>I read that the problem could be about google play services versions</p>
  
  <p>android/build.gradle</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.5.1'
          classpath 'com.google.gms:google-services:4.2.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>android/capacitor-cordova-android-plugins/build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          google()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.2'
      }
  }
  
  apply plugin: 'com.android.library'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          minSdkVersion 21
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
      }
      lintOptions {
          abortOnError false
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  }
  
  repositories {
      google()
      jcenter()
      mavenCentral()
      flatDir{
          dirs 'src/main/libs', 'libs'
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'src/main/libs', include: ['*.jar'])
      implementation 'org.apache.cordova:framework:7.0.0'
      // SUB-PROJECT DEPENDENCIES START
      implementation "com.google.android.gms:play-services-base:11.0.4"
      implementation "com.google.android.gms:play-services-ads:11.0.4"
      // SUB-PROJECT DEPENDENCIES END
  }
  
  // PLUGIN GRADLE EXTENSIONS START
  apply from: "cordova.variables.gradle"
  // PLUGIN GRADLE EXTENSIONS END
  
  for (def func : cdvPluginPostBuildExtras) {
      func()
  }
  </code></pre>
  
  <p>I am following the next <a href="https://www.freakyjolly.com/ionic-4-implement-admob-free-native-plugin-in-latest-ionic-4-applications-more-efficiently/" rel="nofollow noreferrer">tutorial</a> , do you know some solution for this?</p>