欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Android问题集锦(十) - More than one file was found with OS independent path 'META-INF/DEPENDENCIES'

程序员文章站 2022-04-14 08:18:44
...

报错:

Error:com.android.builder.merge.DuplicateRelativeFileException:
More than one file was found with OS independent path 'META-INF/DEPENDENCIES'

在报错的module下的builde.gradle文件中加入如下配置项:

android{
   //处理所有报META-INF/*'的错误
   packagingOptions {
        pickFirst 'META-INF/*'
   }
}

packagingOptions:指定选项和规则,这些选项和规则确定将android插件包放入您的APK

附图:

Android问题集锦(十) - More than one file was found with OS independent path 'META-INF/DEPENDENCIES'

可在查看Android 插件DSL