Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Gradle errors assembling apk's #194

Open

Description

@stonier

Getting this error assembling apk's with the new gradle plugin (0.7.1):

Error: duplicate files during packaging of APK /mnt/ros/android/hydro/src/android_core/android_benchmarks/build/apk/android_benchmarks-release-unsigned.apk
        Path in archive: META-INF/NOTICE.txt
        Origin 1: /home/snorri/.gradle/caches/modules-2/files-2.1/commons-pool/commons-pool/1.6/4572d589699f09d866a226a14b7f4323c6d8f040/commons-pool-1.6.jar
        Origin 2: /home/snorri/.gradle/caches/modules-2/files-2.1/org.apache.commons/com.springsource.org.apache.commons.lang/2.4.0/686e3713650c8e3a5d98723b4d3e239586bf9822/com.springsource.org.apache.commons.lang-2.4.0.jar
You can ignore those files in your build.gradle:
        android {
          packagingOptions {
            exclude 'META-INF/NOTICE.txt'
          }
        }

Also happens for LICENSE.txt. This is because those jar's are providing identifical files (maybe should be stored in a subfolder?) that get copied on top of each other when assembling the apk. Previously I suspect the android plugin just ignored that behaviour, now it throws an error.

You can ignore it as mentioned, but it's a bit of an ugly hack to have to do. Should be fixed in upstream jars?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions