Cordova-plugin-firebase causing -- Plugin with id 'com.google.gms.google-services' not found

#1

In trying to get android adaptive icons to work, it was suggested to remove the platform and add android again.
I did this, but now I get this error

  • What went wrong:
    A problem occurred evaluating root project ‘android’.

Plugin with id ‘com.google.gms.google-services’ not found.

I have been able to build before just fine.

The cordova-plugin-firebase plugin seems to be the problem. The gradle it creates has this.

buildscript {

    repositories {

        jcenter()

        mavenCentral()

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:+'

        classpath 'com.google.gms:google-services:4.1.0'

    }

}

repositories {

    mavenCentral()

    maven {

        url "https://maven.google.com"

    }

}



dependencies {

    compile 'me.leolin:ShortcutBadger:1.1.4@aar'

    compile 'com.google.firebase:firebase-auth:+'

    compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {

       transitive = true

    }

}



cdvPluginPostBuildExtras.add({

    apply plugin: 'com.google.gms.google-services'

})

This matches all our other apps that build just fine.
Do I need to set something up again for cordova-plugin-firebase???

#2

For some reason these lines were missing from the build.gradle file

// Fabric Cordova Plugin - Start Fabric Build Tools 
buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        maven { url 'https://maven.google.com' }
    }
    dependencies {
        classpath 'io.fabric.tools:gradle:1.25.4'
        classpath 'com.google.gms:google-services:+'
    }
}

apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'

Adding them back in solved my problem