android - 不推荐使用配置 'compile',但所有配置都是 'implementation'

标签 android gradle kotlin android-studio-3.0

在 android 中执行 gradle 时收到以下警告:

Configuration 'compile' in project ':app' is deprecated.

但我的所有依赖项都通过实现配置包含在内。 (还有模块) gradle 中是否存在任何“不可见”的依赖项?

这是我的主要构建 gradle 文件:https://pastebin.com/ZJe7zrwn

最佳答案

我今天在编译我的代码时发现了这个可行的解决方案。 (当一切都是 implementation 而你的 build.gradle 中没有任何东西是 compile)

错误:

 1. Configuration 'compile' in project ':app' is deprecated 
 2. registerResGeneratingTask is deprecated, use registerGeneratedFolders (FileCollection)

解决方案:

我需要更新我的项目:build.gradle

来自

classpath 'com.google.gms:google-services:3.1.0'

classpath 'com.google.gms:google-services:3.2.0'

关于android - 不推荐使用配置 'compile',但所有配置都是 'implementation',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47300679/

相关文章:

Android 棉花糖 ListView 滚动变得模糊

jpa - 使用 gradle 为 groovy 生成 Querydsl 代码

arrays - Kotlin 数组初始化函数

intellij-idea - 如何在 IntelliJ 中运行 Kotlin Koans?什么是 "Main class"?

java - 使用google fit android api读取数据时获取 "Task is not yet complete error"

java - Android 应用程序的后端建议

Android 历史栈——回溯不止一步

groovy - Gradle:testDependents 和 testNeeded

android - 如何在我的发布 aar 中打包多个 AAR

android - kotlin View.OnClickListener?预计