com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileExcep

来源:互联网 发布:检测普通话的软件 编辑:程序博客网 时间:2024/06/03 06:43


//运行报错,在下面添加之后exclude('META-INF/LICENSE.txt')

 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE.txt
//运行报错,在下面添加之后exclude('META-INF/NOTICE.txt')
 Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/NOTICE.txt

android {

packagingOptions {

exclude('META-INF/LICENSE.txt')

exclude('META-INF/NOTICE.txt')

}}

0 0