title: Cannot add extension with name 'googleServices', as there is an extension already registered with that name. - Ionic Capacitor
body: <p>I have a mobile app written using Ionic Angular. My Ionic version is 5. I build it with Capacitor.</p>
  <p>I have added <a href="https://ionicframework.com/docs/native/admob-free" rel="nofollow noreferrer">Admob Free</a> plugin to my app and the ad implementation is working fine. Later I wanted to integrate push notifications into my app, so that I decided to go with <a href="https://ionicframework.com/docs/native/fcm" rel="nofollow noreferrer">FCM</a> plugin.</p>
  <p>Now when I open the android platform of the project in Android Studio, I get the below error in build console. Note that I have placed the <code>google-services.json</code> file in the correct place.</p>
  <blockquote>
  <p>Cannot add extension with name 'googleServices', as there is an
  extension already registered with that name.</p>
  </blockquote>
  <p><strong>app -&gt; build.gradle file.</strong></p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId &quot;my.app.id&quot;
          minSdkVersion 21
          targetSdkVersion 28
          versionCode 1
          versionName &quot;1.0&quot;
          testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  repositories {
      maven {
          url  &quot;https://dl.bintray.com/ionic-team/capacitor&quot;
      }
      flatDir{
          dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
      }
  }
  
  dependencies {
      implementation fileTree(include: ['*.jar'], dir: 'libs')
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation project(':capacitor-android')
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation project(':capacitor-cordova-android-plugins')
  }
  
  apply from: 'capacitor.build.gradle'
  
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  <p><strong>Project level -&gt; build.gradle</strong></p>
  <pre><code>buildscript {
      
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.3.2'
          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>As I think, Admob plugin internally uses the google services plugin and when FCM plugin tries to add the same plugin this error occurs. Correct me if I am wrong.</p>
  <p>Anyway, can someone please help me to resolve the issue.</p>
  <p>Thank you..!</p>