【问题标题】:How to exclude a dependency from a local library in Android studio如何从 Android Studio 中的本地库中排除依赖项
【发布时间】:2021-09-18 15:38:15
【问题描述】:
implementation files("libs/Somelib.jar") {
        exclude(group = 'com.example.mypackage', module = 'somelib-ex')
    }

想要排除

无法为 org.gradle.api.Project 类型的项目 ':android-aw-network-library' 设置只读属性 'module' 的值。

【问题讨论】:

    标签: android android-studio jar build.gradle


    【解决方案1】:

    根据 gradle 文档:

    https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html#sec:excluding-transitive-deps

    dependencies {
    implementation('commons-beanutils:commons-beanutils:1.9.4') {
        exclude group: 'commons-collections', module: 'commons-collections'
    }
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-25
    • 2022-06-11
    • 1970-01-01
    • 2017-11-11
    相关资源
    最近更新 更多