AS开发中出现Error(十一)——Duplicate files copied in APK META-INF/LICENSE.txt

来源:互联网 发布:java actionperformed 编辑:程序博客网 时间:2024/06/11 05:01
Duplicate files copied in APK META-INF/LICENSE.txt File 1: /.../libs/httpclient-4.1.1.jar File 2: /.../libs/httpclient-4.1.1.jar

原因:根据(Duplicate files copied in APK)看错这种情况讲的是引用包有冲突,就是可能两个包中有冲突类等等

解决:在app->build.gradle文件中修改

android {      ...    packagingOptions {          exclude 'META-INF/DEPENDENCIES.txt'        exclude 'META-INF/LICENSE.txt'        exclude 'META-INF/NOTICE.txt'        exclude 'META-INF/NOTICE'        exclude 'META-INF/LICENSE'        exclude 'META-INF/DEPENDENCIES'        exclude 'META-INF/notice.txt'        exclude 'META-INF/license.txt'        exclude 'META-INF/dependencies.txt'        exclude 'META-INF/LGPL2.1'    }  }  
阅读全文
0 0