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
File1: F:\AndroidStudioProjects\xxx\app\libs\jackson-mapper-asl-1.9.7.jar
File2: F:\AndroidStudioProjects\xxx\app\libs\jackson-core-asl-1.9.7.jar
此类问题的解决方法就是按照提示,去掉重复的地方即可,具体如下:
packagingOptions {
exclude 'META-INF/NOTICE'// will not include NOTICE file
exclude 'META-INF/LICENSE'// will not include LICENSE file
exclude 'META-INF/ASL2.0'//will not include ALS2.0 file
}