Instant App-多模块项目-配置'compile'已过时,并已由'implementation'和'api'代替

时间:2018-07-10 03:11:44

标签: android gradle android-gradle android-instant-apps

我的项目有多个模块来支持即时应用程序。更新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。但无论哪种情况,构建都会失败或应用程序崩溃,并显示诸如找不到ClassBModuleB之类的消息。

关于如何解决多模块项目的任何建议?

0 个答案:

没有答案