> More than one file was found with OS independent path 'META-INF/rxjava.properties'

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'META-INF/rxjava.properties'

集成了很多的库
 //    Rxbinding
    compile 'com.jakewharton.rxbinding:rxbinding:0.4.0'
    compile 'com.jakewharton.rxbinding:rxbinding-design:0.4.0'
    compile 'com.jakewharton.rxbinding:rxbinding-kotlin:0.4.0'
    compile 'com.jakewharton.rxbinding:rxbinding-support-v4:0.4.0'
    compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
    //    Rxandroid,RxJava2
    compile 'io.reactivex:rxandroid:1.2.1'
    compile 'io.reactivex.rxjava2:rxjava:2.0.0'
    compile project(path: ':autolayout')

遇到了一个bug

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'META-INF/rxjava.properties'

记录一下解决办法:
在项目的app下的build.gradle里面的defaultConfig 的

android {

      packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
        //添加
                exclude 'META-INF/rxjava.properties'

      }

    }

你可能感兴趣的:(bug)