在我的项目构建中,我已经替换了每一个compile by implementation的出现。gradle,但是我仍然得到这个警告:
我试图在整个项目中寻找“compile”,但没有找到匹配。那么原因是什么呢?
在我的项目构建中,我已经替换了每一个compile by implementation的出现。gradle,但是我仍然得到这个警告:
我试图在整个项目中寻找“compile”,但没有找到匹配。那么原因是什么呢?
当前回答
在我的例子中,它是一个使用compile来实现传递依赖的旧依赖:com.jakewharton.hugo
将它从我的gradle中删除后,它编译了。
其他回答
去你的建筑。Gradle(应用级)
构建。Gradle模块app
将“编译”替换为“实现”
100%可以正常工作
不需要拆线。正如Jkrevis所写的,更新com.google。Gms:google-services升级到3.2.0并停止警告。
我尝试了这里提到的所有解决方案,但运气不佳。 我在我的身材里发现的。Gradle文件如下:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
我只是将其更改为如下所示并保存并尝试构建成功。
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
你有两种选择:
在project: build中添加类路径'com.google.gms:google-services:3.2.0'。gradle依赖性 而且 替换模块:build。Gradle依赖于编译实现 而且你不会收到任何警告信息。
回到你的位置。在项目级别的Gradle文件中,您会发现以下行突出显示
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' //place your cursor over here
//and hit alt+enter and it will show you the appropriate version to select
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.2' //the same as previously
}