文章目录
- 一、问题描述
- 二、解决警告
-
- 2.1 官方说明Dependency configurations
- 2.2 将 'compile' 替换为 'implementation' 或'api'.
- 2.2.1 将 'compile' 替换为 'implementation' 或'api'.
- 2.2.2 'implementation' 和 'api' 介绍
- 2.3 将'debugCompile' 改为'debugImplementation' 或'debugApi'。'releaseCompile' 改为'releaseImplementation' 或'releaseApi'.
- 2.4 将'testCompile' 改为'testImplementation' 或'testApi'。
一、问题描述
其实很久之前就已经升级到了Gradle 3.x的版本了,新的 dependency configurations 也早就知道了,但是一直没有去更换,编译的时候,出现如下的警告:
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: audiorecord, basiclib, componentlib, p_changephone, p_contact, p_h5, p_icloud, p_imphone, p_location, p_moduleswitch, p_msgrecord, p_outdooractivity, p_photodial, p_realtimeforbidden, p_se