com.android.builder.packaging.DuplicateFileException:在APK META-INF / rxjava.properties中复制的重复文件

时间:2017-03-14 03:24:03

标签: rx-java2

错误:任务':app:transformResourcesWithMergeJavaResForDebug'执行失败。

  

com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException:在APK META-INF / rxjava.properties中复制的重复文件       File1:D:\ Android \ Android Studio \ gradle \ _caches \ modules-2 \ files-2.1 \ io.reactivex.rxjava2 \ rxjava \ 2.0.2 \ cfccdd18cdfbe7b4773d42c9f3512eeafbe5cbf9 \ rxjava-2.0.2.jar       File2:D:\ Android \ Android Studio \ gradle \ _caches \ modules-2 \ files-2.1 \ io.reactivex \ rxjava \ 1.2.1 \ 4e4cfa4adc74521d5966799fa5ab70b733552f68 \ rxjava-1.2.1.jar

1 个答案:

答案 0 :(得分:5)

在app / build.gradle中添加:

``` android {

......

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

} ```