报错transformResourcesWithMergeJavaResForDebug的解决办法

时间:2016-05-27 18:29:05   收藏:0   阅读:2404

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/ASL2.0
File1: D:\MYJSON\app\libs\jackson-core-asl-1.9.13.jar
File2: D:\MYJSON\app\libs\jackson-mapper-asl-1.9.13.jar
运行就报这个错

 

在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
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!