【Android】已正确替换为implementation 却仍然报错Configuration 'compile' is obsolete and has been replaced ...

今天在编译环信demo时,提示

Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018
 

查找gradle文件未发现compile,在网上找到解决方法

将com.google.gms:google-services更新为3.2.1,在Project的build.gradle下增加:com.google.gms:google-services3.2.1.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.2.1'
    }
}

allprojects {
    repositories {
        jcenter()
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

 

你可能感兴趣的:(【Android】已正确替换为implementation 却仍然报错Configuration 'compile' is obsolete and has been replaced ...)