0

I having android app where I'm using google translate API When I build, I got Error : Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. More than one file was found with OS independent path 'META-INF/LICENSE'

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
hr intern
  • 23
  • 5

2 Answers2

2

try adding

packagingOptions {

        pickFirst "**"
    }

OR

packagingOptions {
   pickFirst  'META-INF/LICENSE'
}

OR

packagingOptions{
    exclude 'META-INF/LICENSE'
 }
NIPHIN
  • 1,071
  • 1
  • 8
  • 16
1

try adding these lines in your app level gradle file

packagingOptions {
  exclude 'project.properties'
  exclude 'META-INF/LICENSE'
  exclude 'META-INF/NOTICE'
  exclude 'META-INF/INDEX.LIST'
}
adiga
  • 34,372
  • 9
  • 61
  • 83
Swapnil Musale
  • 182
  • 1
  • 15