项目导入第三方包的时候出现

Execution failed for task':app:transformResourcesWithMergeJavaResForDebug More than one file was found with OS independent path"META-INF/rxjava.properties'的错误,如下图所示:

Execution failed for task...More than one file was found with OS independent path'META-INF/rxjava...

查看Gradle Console打印的日志为:

Execution failed for task...More than one file was found with OS independent path'META-INF/rxjava...

解决方案是:

在app下的build.gradle的配置文件的android闭包中添加如下:

packagingOptions {
    //解决编译时com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'META-INF/rxjava.properties'这个错误
    exclude 'META-INF/rxjava.properties'
}

点击Sync Now同步一下重新编译OK。

相关文章:

  • 2021-05-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2021-11-17
  • 2021-04-20
  • 2021-07-19
猜你喜欢
  • 2021-07-26
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案