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

报错:

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'_第1张图片

可在查看Android 插件DSL


你可能感兴趣的:(疑难杂症)