gpt4 book ai didi

Android 获取 Retrofit 和 Retrofit Adapter 的 DuplicateFileException 错误

转载 作者:搜寻专家 更新时间:2023-11-01 08:27:30 27 4
gpt4 key购买 nike

在项目上安装这个库之后:

compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'

我收到这个错误:

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties
File1: /Users/mahdi/.gradle/caches/modules-2/files-2.1/io.reactivex.rxjava2/rxjava/2.0.1/57f850a6b317e5582f1dbaff10a9e7d7e1fcdcfb/rxjava-2.0.1.jar
File2: /Users/mahdi/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.1.5/ece7b5d0870e66d8226dab6dcf47a2b12afff061/rxjava-1.1.5.jar

我不确定是什么问题,有些文档像我的解决方案一样安装了它们。

packagingOptions {
exclude 'META-INF/io.reactivex.rxjava2/rxjava/2.0.1/57f850a6b317e5582f1dbaff10a9e7d7e1fcdcfb/rxjava.properties'
exclude 'META-INF/io.reactivex/rxjava/rxjava.properties'
}

最佳答案

问题解决:

packagingOptions {
exclude 'META-INF/rxjava.properties'
}

关于Android 获取 Retrofit 和 Retrofit Adapter 的 DuplicateFileException 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43399189/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com