Plugin with id 'com.google.gms.google-services' not found

前端 未结 10 998
有刺的猬
有刺的猬 2020-12-02 18:04

I have followed this link to integrate ads in my app. But it shows this error:

\"error

This is

10条回答
  •  再見小時候
    2020-12-02 18:27

    simply add "classpath 'com.google.gms:google-services:3.0.0'" to android/build.gradle to look like this

    buildscript {
        repositories {
            maven {
                url "https://maven.google.com"
            }
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.1'
            classpath 'com.google.gms:google-services:3.0.0'
    
           // NOTE: Do not place your application dependencies here; they belong
           // in the individual module build.gradle files
    
        }
    }
    

    and also add "apply plugin: 'com.google.gms.google-services'" to the end of file in android/app/build.gradle to look like this

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

提交回复
热议问题