unknown property 'LibraryVariants' in build.gradle

前端 未结 3 2087
死守一世寂寞
死守一世寂寞 2020-12-20 15:43

I have the error below in build.gradle at this line:

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

Error:(56, 0) Could n

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-20 16:28

    I had the same problem and solved it updating gradle and google-services versions.

    // 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.0.0'
            classpath 'com.google.gms:google-services:3.1.1'
            // 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
    }
    

提交回复
热议问题