首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >模块排除修复实现android

模块排除修复实现android
EN

Stack Overflow用户
提问于 2022-06-11 12:51:04
回答 1查看 163关注 0票数 0

我已经为我的应用程序使用了一段时间的实时Firebase,.I需要将Firestore添加到我的项目中。当添加防火墙时,我有一个复制错误。我想将模块排除在防火墙之外,而不是从其他库中排除。除了被复制的gson之外,我无法识别应该移除哪个模块。

implementation('com.google.firebase:firebase-firestore:24.1.2'){排除模块:'gson',排除模块:?}似乎非常接近或重复了其他一些问题,但是在以前的问题中,没有一个给定的答案有效。

我不能给出所有的gradle,因为文件非常大,但是google的主要元素是:

代码语言:javascript
复制
implementation 'com.google.firebase:firebase-database:20.0.0'
implementation 'com.google.firebase:firebase-auth:20.0.0'
implementation 'com.google.firebase:firebase-core:20.0.0'
implementation 'com.google.firebase:firebase-functions:20.0.0'
implementation 'com.google.firebase:firebase-storage:20.0.0'

implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

implementation('com.google.firebase:firebase-firestore:20.0.0') {
    exclude module: 'gson'
    exclude module: 'com.google.gauva:gauva-jdk5:17.0'
}


implementation 'com.google.api-client:google-api-client-android:1.23.0' exclude module: 'httpclient' exclude module: 'com.google.gauva:gauva-jdk5:17.0'

我假设问题来自于实现files('libs\deeparteffects-android-client-1.0.0-jar-with-dependencies.jar'),但我不能真正测试它。

代码语言:javascript
复制
Duplicate class com.google.common.util.concurrent.WrappingExecutorService found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.util.concurrent.WrappingExecutorService$1 found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.util.concurrent.WrappingScheduledExecutorService found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.util.concurrent.package-info found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.xml.XmlEscapers found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.common.xml.package-info found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.thirdparty.publicsuffix.PublicSuffixPatterns found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.thirdparty.publicsuffix.PublicSuffixType found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
Duplicate class com.google.thirdparty.publicsuffix.TrieParser found in modules jetified-guava-30.1.1-android (com.google.guava:guava:30.1.1-android) and jetified-guava-jdk5-17.0 (com.google.guava:guava-jdk5:17.0)
EN

回答 1

Stack Overflow用户

发布于 2022-07-19 11:10:23

您可能会发现这个堆叠溢流柱有助于理解依赖树。

您使用的语法与大多数文档状态不匹配:2 3. 4.

您的语法:

代码语言:javascript
复制
implementation('com.google.firebase:firebase-firestore:20.0.0') {
        exclude module: 'gson'
        exclude module: 'com.google.gauva:gauva-jdk5:17.0'
    }

博客中提到的

configurations.implementation {排除组:‘org.SpringFrawork.boot’,模块:‘spring starter’}

线程中提到的

实现('com.google.apis:google-api-services-youtube:v3-rev183-1.22.0') {排除组:'org.apache.httpcomponents‘排除组:’com.google.guava‘}

线程中提到的

Configurations.implementation.exclude(群组:'com.google.firebase',模块:‘protolite-知名-类型’)

尝试更改配置语法以获得所需的结果。

代码语言:javascript
复制
configurations.implementation {
  exclude group: 'com.google.gauva', module: 'gauva-jdk5'
} 

代码语言:javascript
复制
configurations.implementation.exclude(group: 'com.google.gauva', module: 'gauva-jdk5') 
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72584478

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档