首页 文章

Gradle 3.0 . *的Android插件使用Gradle的新依赖配置compileOnly不使用资源引用

提问于
浏览
0

我有两个模块, supportmall ,它是主入口模块 app 的本地模块 .

但在模块 mall 中,我在 support 中引用了很多资源 .

在gradle 3.0的android插件之前

我刚刚在 build.gradle 中的模块 mall 的依赖项中使用 compile 来包含 support

我在模块 app 中使用 compile 来包含模块 supportmall .

它很有用 .

在gradle 3.0的android插件之后

我想升级using Gradle's new dependency configurations: implementation, api, compileOnly, and runtimeOnly .

但是当我在模块 mall 中使用compileOnly来包含 support 依赖项时,它对我不起作用 .

1 回答

  • 0

    implementation 替换 compile 指令 . 在gradle 3.0中没有更改 compileOnly 指令你不应该使用它 .

相关问题