我已经为我的应用程序使用了一段时间的实时Firebase,.I需要将Firestore添加到我的项目中。当添加防火墙时,我有一个复制错误。我想将模块排除在防火墙之外,而不是从其他库中排除。除了被复制的gson之外,我无法识别应该移除哪个模块。
implementation('com.google.firebase:firebase-firestore:24.1.2'){排除模块:'gson',排除模块:?}似乎非常接近或重复了其他一些问题,但是在以前的问题中,没有一个给定的答案有效。
我不能给出所有的gradle,因为文件非常大,但是google的主要元素是:
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'),但我不能真正测试它。
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)发布于 2022-07-19 11:10:23
您可能会发现这个堆叠溢流柱有助于理解依赖树。
您的语法:
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-知名-类型’)
尝试更改配置语法以获得所需的结果。
configurations.implementation {
exclude group: 'com.google.gauva', module: 'gauva-jdk5'
} 或
configurations.implementation.exclude(group: 'com.google.gauva', module: 'gauva-jdk5') https://stackoverflow.com/questions/72584478
复制相似问题