DuplicateFileException m4b +播放服务9.0 [英] DuplicateFileException m4b + play services 9.0

查看:120
本文介绍了DuplicateFileException m4b +播放服务9.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

错误:任务执行失败':app:transformResourcesWithMergeJavaResFor'。


com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException:在APK中复制的重复文件jsr305_annotations / Jsr305_annotations.gwt.xml
File1:\app\build\intermediates\exploded-aar\google-maps-sdk- m4b \jars\classes.jar
File2:\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-basement\9.0.0 \jars\classes.jar


解决方案

build.gradle 在 android {} 部分中解决问题。

  android {
...
packagingOptions {
exclude'jsr305_annotations / Jsr305_annotations.gwt .xml'
exclude'build-data.properties'
}
...
}

如果获取更多错误DuplicateFileException将添加文件与排除。
赞:

错误

 复制的文件APK jsr305_annotations / Jsr305_annotations.gwt.xml 

解决方案

 排除'jsr305_annotations / Jsr305_annotations.gwt.xml'


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

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK jsr305_annotations/Jsr305_annotations.gwt.xml File1:\app\build\intermediates\exploded-aar\google-maps-sdk-m4b\jars\classes.jar File2:\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-basement\9.0.0\jars\classes.jar

解决方案

Add below text in build.gradle inside the android{} section to solve the problem.

android {
...
    packagingOptions {
        exclude  'jsr305_annotations/Jsr305_annotations.gwt.xml'
        exclude  'build-data.properties'
     }
...
}

If getting more error DuplicateFileException add file with exclude. Like :

Error

Duplicate files copied in APK jsr305_annotations/Jsr305_annotations.gwt.xml 

Solution

exclude  'jsr305_annotations/Jsr305_annotations.gwt.xml'

这篇关于DuplicateFileException m4b +播放服务9.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆