Android Duplicate files copied i
2016-05-14 本文已影响240人
木猫尾巴
[TOC]
问题表现
Error:Execution failed for task ':bZSDK2_8:transformResourcesWithMergeJavaResForRelease'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/NOTICE.txt
File1: /Users/sinlov/SourceTree/AS_7723/bZSDK2_8/libs/commons-lang.jar
File2: /Users/sinlov/SourceTree/AS_7723/bZSDK2_8/libs/commons-codec-1.6.jar
解决方法
在报错的module
的build.gradle
设置
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
具体META-INF
后面填写的信息,查看报错日志¡