问题
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'
回答1:
try adding
packagingOptions {
pickFirst "**"
}
OR
packagingOptions {
pickFirst 'META-INF/LICENSE'
}
OR
packagingOptions{
exclude 'META-INF/LICENSE'
}
回答2:
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'
}
来源:https://stackoverflow.com/questions/48355256/error-more-than-one-file-was-found-with-os-independent-path-meta-inf-license