关于 "Android开发中More than file was fount..."的解决办法

今天在开发过程中出现一个报错,具体内容如下:

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

这句话的意思是这个META-INF路径下的rxjava.properties文件被发现多个,也就是说应该是文件重复了,所以要排除多余的文件,通过通过在model中的build.gradle中添加packagingOptions

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/rxjava.properties'
}

根据不同的提示填写不同的exclude

你可能感兴趣的:(Bug)