AndroidStudio Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'
老问题回顾
在引入一些第三方库后 编译 使用没有问题 ,但是打包部署时就报错 如图:
Error:Execution failed for task ‘:app:transformResourcesWithMergeJavaResForDebug’.

More than one file was found with OS independent path ‘META-INF/proguard/androidx-annotations.pro’

主要原因 是 因某些文件重复 引起的
解决方法也很简单
app build.gradle 配置packagingOptions

如上图问题 配置:
AndroidStudio Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'

如果有碰到类似的 异常,只需要 在packagingOptions 内补充exclude ‘重复的文件路径’ 就可以了
packagingOptions{
exclude ’ …’
}

相关文章:

  • 2022-01-16
  • 2021-10-29
  • 2021-09-03
  • 2021-12-03
  • 2021-11-06
  • 2021-04-26
  • 2021-10-07
  • 2021-12-16
猜你喜欢
  • 2022-12-23
  • 2021-09-13
  • 2021-05-03
  • 2021-05-26
  • 2021-09-28
  • 2021-05-21
相关资源
相似解决方案