我的项目有多个模块来支持即时应用程序。更新Android Studio和Gradle后,开始出现警告之下。
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
ModuleA
的等级依赖性:
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':base')
compile project(path: ':ModuleB')
compile project(path: ':ModuleC')
...
}
ModuleB
的等级依赖性:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':base')
compile project(path: ':ModuleC')
...
}
如here所述,我尝试将compile
更新为implementation
和/或api
。但无论哪种情况,构建都会失败或应用程序崩溃,并显示诸如找不到ClassB
或ModuleB
之类的消息。
关于如何解决多模块项目的任何建议?