错误:(29,0)未找到Android的ID为'com.google.gms.google-services'的插件

akk*_*kkk 5 android admob firebase

我在stackoverflow上尝试了很多解决方案,但没有一个对我有用.当我同步它给出的项目时Error:(2, 0) Plugin with id 'com.google.gms.google-services' not found

正如文档所述(最后添加插件)我做了同样的事情.最后添加了插件. apply plugin: 'com.google.gms.google-services'

任何方案?我按照这个链接.与它说的相同,但有错误.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.radioaudio.motivationalaudios"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile files('libs/YouTubeAndroidPlayerApi.jar')
    compile 'com.google.firebase:firebase-ads:9.4.0'
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)