Error:duplicate files during packaging of APK Path in archive: META-INF/LICENSE.txt

添加了这两个jar包的时候,编译的时候出现类似错误。
Error:duplicate files during packaging of APK Path in archive: META-INF/LICENSE.txt
commons-io-2.4.jar
commons-collections4-4.0.jar

根据提示可以添加相应的文件即可。
android {
     // ......
     buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/MANIFEST.MF'
    }

你可能感兴趣的:(Error:duplicate files during packaging of APK Path in archive: META-INF/LICENSE.txt)