在我的项目构建中,我已经替换了每一个compile by implementation的出现。gradle,但是我仍然得到这个警告:
我试图在整个项目中寻找“compile”,但没有找到匹配。那么原因是什么呢?
在我的项目构建中,我已经替换了每一个compile by implementation的出现。gradle,但是我仍然得到这个警告:
我试图在整个项目中寻找“compile”,但没有找到匹配。那么原因是什么呢?
当前回答
我尝试了这里提到的所有解决方案,但运气不佳。 我在我的身材里发现的。Gradle文件如下:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
我只是将其更改为如下所示并保存并尝试构建成功。
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
其他回答
去你的建筑。Gradle(应用级)
构建。Gradle模块app
将“编译”替换为“实现”
100%可以正常工作
回复谷歌:https://issuetracker.google.com/issues/74048134
会有一些依赖仍然使用编译,仔细检查你的应用程序依赖和传递依赖。
只需从构建中添加。从构建脚本Gradle
classpath 'com.google.gms:google-services:3.2.0'
所有依赖项“compile”替换为“implementation”。
这对我很管用。
当前版本为4.2.0:
构建脚本 {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.2.0'
}
}
我已经更新了com.google。Gms:google-services从3.1.1升级到3.2.0,警告停止出现。
buildscript {
repositories {
google()
jcenter()
}
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.0")
}
}