Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

集成环信easeui,出现:

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.

> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK assets/Icon_start.png

File1: D:\AndroidStudioProjects\MyProject\MiaoXin\app\libs\BaiduLBS_Android.jar

File2: D:\AndroidStudioProjects\MyProject\MiaoXin\easeui\build\intermediates\bundles\default\classes.jar


原因:

libs 下 BaiduLBS_Android.jar  重复添加依赖.

从Stack Overflow的如下配置有问题,

packagingOptions {

exclude'META-INF/NOTICE'// will not include NOTICE file

exclude'META-INF/LICENSE'// will not include LICENSE file

// as noted by @Vishnuvathsan you may also need to include

// variations on the file name. It depends on your dependencies.

// Some other common variations on notice and license file names

exclude'META-INF/notice'

exclude'META-INF/notice.txt'

exclude'META-INF/license'

exclude'META-INF/license.txt'

}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容