Duplicate entry: META-INF/ when build .apk

Viewed 3169

I am getting following error. I am stuck on this error from last 2 days, I don't know how resolve this error. Anybody please help me out to resolve this error. Thanks in advance

   Execution failed for task ':app:buildProductionBuildDebugPreBundle'.
> java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF

1 Answers

You can exclude this files by adding those lines to your modules build.gradle:

android {

  packagingOptions {
    exclude 'META-INF/MANIFEST.MF'
  }
}

add the packagingOptions attribute into the android section of the gradle file.

Related