Error : More than one file was found with OS independent path 'META-INF/LICENSE'

ぐ巨炮叔叔 提交于 2019-12-11 16:52:40

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!