【问题标题】:Android plugin for gradle 3.0.* using Gradle's new dependency configurations compileOnly not working with resource referencegradle 3.0.* 的 Android 插件使用 Gradle 的新依赖配置 compileOnly 不使用资源参考
【发布时间】:2017-11-27 07:46:47
【问题描述】:

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

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

  • 在 gradle 3.0 的 android 插件之前:

我只是在模块 mall 中使用了 compilebuild.gradle 中的依赖项来包含 support

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

它可以找到。

  • 在 gradle 3.0 的 android 插件之后:

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

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

【问题讨论】:

    标签: android gradle


    【解决方案1】:

    compile 指令替换为implementationcompileOnly 指令在 gradle 3.0 中没有改变,你不应该使用它。

    【讨论】:

    • 谢谢。看起来像。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-02-04
    • 2020-10-25
    • 1970-01-01
    • 2013-12-06
    • 2017-12-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多