android – 在interactivemedia中的APK error_prone / Annotations.gwt.xml中复制的重复文件

前端之家收集整理的这篇文章主要介绍了android – 在interactivemedia中的APK error_prone / Annotations.gwt.xml中复制的重复文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
错误:任务’:app:transformResourcesWithMerge JavaResForDevDebug’的执行失败.

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK error_prone/Annotations.gwt.xml
File1: /Users/manmohansingh/.android/build-cache/c5c673e638724b8a150c9a07f761f05b8fef0253/output/jars/classes.jar
File2: /Users/manmohansingh/.gradle/caches/modules-2/files-2.1/com.google.ads.interactivemedia.v3/interactivemedia/3.6.0/76bc1544c67335c4bb38631001fd05a3e70004e4/interactivemedia-3.6.0.jar

解决方法

经过三个小时的挣扎得到了这个解决方案:将这些线加入
packagingOptions {
    exclude 'error_prone/Annotations.gwt.xml'
    exclude 'third_party/java_src/error_prone/project/annotations/Annotations.gwt.xml'
    exclude 'third_party/java_src/error_prone/project/annotations/Google_internal.gwt.xml'
}

最后 :

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'
    exclude 'Meta-INF/rxjava.properties'

    exclude 'error_prone/Annotations.gwt.xml'
    exclude 'third_party/java_src/error_prone/project/annotations/Annotations.gwt.xml'
    exclude 'third_party/java_src/error_prone/project/annotations/Google_internal.gwt.xml'
}
原文链接:https://www.f2er.com/android/317058.html

猜你在找的Android相关文章