本文翻译自:Still getting warning : Configuration 'compile' is obsolete and has been replaced with 'implementation'

I have replaced every occurrence of compile by implementation in my project's build.gradle , but I'm still getting this warning : 我已经在项目的build.gradle中用implementation替换了所有出现的compile build.gradle ,但是仍然收到以下警告:

I tried to look for "compile " in the whole project but no match was found. 我试图在整个项目中寻找“编译”,但未找到匹配项。 So what could be the cause? 那是什么原因呢?


#1楼

参考:https://stackoom.com/question/3INf4/仍在警告-配置-编译-已过时-并已由-实现-代替


#2楼

https://issuetracker.google.com/issues/72479188 indicates that plugins sometimes can introduce "compile" dependencies and that's what triggers the warning. https://issuetracker.google.com/issues/72479188指示插件有时会引入“编译”依赖项,这就是触发警告的原因。 Probably just easiest to star that issue and wait until they fix it to point out which plugins are causing the issue. 也许最容易给该问题加注星标,然后等待他们修复它,以指出引起该问题的插件。


#3楼

Reply by google : https://issuetracker.google.com/issues/74048134 谷歌回复: https : //issuetracker.google.com/issues/74048134

There would be some dependency still using compile, check your application dependencies and transitive dependencies carefully. 仍有一些依赖项仍在使用编译,请仔细检查您的应用程序依赖项和可传递依赖项。


#4楼

I've updated com.google.gms:google-services from 3.1.1 to 3.2.0 and the warning stopped appearing. 我已经将com.google.gms:google-services3.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 filesclasspath 'com.google.gms:google-services:3.2.0'}
}

#5楼

No need to remove the line. 无需删除该行。 As Jkrevis wrote, update the com.google.gms:google-services to 3.2.0 and it stops the warnings. 正如Jkrevis所写,将com.google.gms:google-services更新为3.2.0并停止警告。


#6楼

Open up your build.gradle file located here: 打开位于以下位置的build.gradle文件:

This is the old way of writing the dependency libraries (for gradle version 2 and below): 这是编写依赖库的旧方法(适用于gradle版本2和更低版本):

dependencies {compile fileTree(dir: 'libs', include: ['*.jar'])testCompile 'junit:junit:4.12'compile files('libs/volley.jar')compile 'com.android.support:support-v4:21.+'
}

This is the new (right) way of importing the dependencies for gradle version 3: 这是为gradle版本3导入依赖关系的新(正确)方法:

dependencies {implementation fileTree(dir: 'libs', include: ['*.jar'])testImplementation 'junit:junit:4.12'implementation files('libs/volley.jar')implementation 'com.android.support:support-v4:21.+'
}

仍在警告:配置“编译”已过时,并已由“实现”代替相关推荐

  1. 此网站使用的安全性配置已过时,这可能会导致您的信息(例如密码、消息或信用卡卡号)谷歌打不开https网站

    浏览器报错内容和截图: 您的连接存在安全隐患: 此网站使用的安全性配置已过时,这可能会导致您的信息(例如密码.消息或信用卡卡号) . 在这里插入图片描述 解决办法: 是将网站的TLS升级为安全的1.2 ...

  2. “此网站使用的安全性配置已过时,这可能会导致您的信息(例如密码、消息或信用卡卡号)”

    浏览器报错内容和截图: 您的连接存在安全隐患: 此网站使用的安全性配置已过时,这可能会导致您的信息(例如密码.消息或信用卡卡号) . 解决办法: 是将网站的TLS升级为安全的1.2

  3. 在配置spring-boot的yml文件中的项目路径时出现横划线表明已过时

    在配置spring-boot的yml文件中的项目路径时出现横划线表明已过时 换成server.servlet.context-path 即可

  4. 最新历史版本 :LINUX KERNEL 配置编译中文指南

    LINUX KERNEL 配置编译中文指南 序言 近几年,linux大行其道,令不满windows蓝屏的使用者跃跃欲试,结果发现linux安装不及windows方便,界面不及windows友好,配置不 ...

  5. IDEA中提示:Warning:java: 源值1.5已过时, 将在未来所有发行版中删除

    问题描述: 运行Java Web项目时,IDEA中提示:Warning:java: 源值1.5已过时, 将在未来所有发行版中删除 解决方法: 1. 打开[File]-[Project Structur ...

  6. Spring Boot——WebMvcConfigurerAdapter已过时解决方案

    问题描述 Spring Boot2.0及以上版本,编译器显示WebMvcConfigurerAdapter已过时. 问题分析 暂无. 解决方案 实现WebMvcConfigurer接口 @Config ...

  7. System.Configuration.ConfigurationSettings.GetConfig(string)”已过时 问题的解决方法

    在VS 2005中,经常会使用到ConfigurationSettings类来读取应用程序配置文件的信息,以获取数据库连接的字符串,但是,经常会出现如下的错误: 警告"System.Conf ...

  8. IntelliJ IDEA 源值1.5已过时,将在未来所有版本中删除

    转载自  IntelliJ IDEA 源值1.5已过时,将在未来所有版本中删除 原因: IDEA默认把项目的源代码版本设置为jdk1.5,目标代码设置为jdk1.5 解决方案: 1修改Maven的Se ...

  9. 人工智能方向改变,图灵测试是否已过时?

    [编者按]人工智能已经影响人们的生活很久很久了,甚至可以说,如果没有人工智能,现代生活恐怕很难维持.然而什么是人工智能,应该怎么去评判人工智能,标准有哪些?这些都是值得思考的问题-- 编译 | 弯月 ...

最新文章

  1. CUDA运行时 Runtime(二)
  2. windows下sse性能对比
  3. JDBC+Servlet+JSP整合开发之22.JSP简介
  4. 信号回勾产生的原因_电力电缆故障原因及常用检测方法
  5. [CareerCup] 8.7 Chat Server 聊天服务器
  6. 京东2020算法工程师0824笔试题整理
  7. 区块链未来发展三大关键词,华为云如何见招拆招?
  8. 数据结构和算法的选择
  9. Err:error occurred at recursive SQL level 1
  10. CSS中filter滤镜的学习笔记
  11. 迈向高算力、跨域融合新拐点,智能座舱各路玩家如何卡位?
  12. 宾得常用镜头群[转自东河寒梅]_我是亲民_新浪博客
  13. OSError: [WinError 127] 找不到指定的程序。 Error loading “C:\Anaconda3\envs\Machine_Learning\lib\site-package
  14. pandas 数据读取与保存
  15. 荣耀“打倒华为”第一机
  16. java计算机毕业设计政府人才机构在线考试系统2021源码+mysql数据库+系统+lw文档+部署
  17. Web渗透测试----1、Web安全学习导图
  18. 软考高级信息系统项目管理师系列论文之三:论项目开发模式的选择与应用
  19. java 替换word文档中的内容
  20. python3项目开发实例网盘_这些关于宇宙的浪漫句子

热门文章

  1. Windos 解决Flutter 报错
  2. gradle编译很慢解决方法
  3. 现在无法停止通用卷设备_软化和柔顺有什么区别吗?头发粗硬适合拉直还是烫卷?...
  4. Android之一窥究竟Activity间的数据传递以及Intent的用处
  5. Android之利用ColorMatrix进行图片的各种特效处理
  6. Objective-C NS_OPTIONS 类型的枚举
  7. swift_024(Swift 的构造过程)
  8. 树莓派私有云(OwnCloud)搭建(三) OwnCloud安装
  9. DOM-based XSS Test Cases
  10. LODOP提示、报错、现象,简短问答