Android Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt

Posted 再见理想

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt相关的知识,希望对你有一定的参考价值。

 1 .Duplicate files copied in APK META-INF/LICENSE.txt

 
android {

    packagingOptions {
    exclude ‘META-INF/LICENSE.txt‘
    }
}

My logcat: log Execution failed for task ‘:Prog:packageDebug‘.

Duplicate files copied in APK META-INF/LICENSE.txt File 1: /home/scijoker/AndroidStudioProjects/ProgProject/Prog/libs/httpclient-4.1.1.jar File 2: /home/scijoker/AndroidStudioProjects/ProgProject/Prog/libs/httpclient-4.1.1.jar

 解决方法:
[java] view plain copy
 
 技术分享技术分享
  1. android {  
  2.       
  3.   
  4.     packagingOptions {  
  5.         exclude ‘META-INF/DEPENDENCIES.txt‘  
  6.         exclude ‘META-INF/LICENSE.txt‘  
  7.         exclude ‘META-INF/NOTICE.txt‘  
  8.         exclude ‘META-INF/NOTICE‘  
  9.         exclude ‘META-INF/LICENSE‘  
  10.         exclude ‘META-INF/DEPENDENCIES‘  
  11.         exclude ‘META-INF/notice.txt‘  
  12.         exclude ‘META-INF/license.txt‘  
  13.         exclude ‘META-INF/dependencies.txt‘  
  14.         exclude ‘META-INF/LGPL2.1‘  
  15.     }  
  16. }  

以上是关于Android Studio 错误 Duplicate files copied in APK META-INF/LICENSE.txt的主要内容,如果未能解决你的问题,请参考以下文章

android studio 代码混淆错误

Android studio 报错问题

Android Studio 1.5错误

Android Studio编译错误总结

android studio错误解答

Android Studio 运行项目遇到的错误