在APK META-INF/library_release.kotlin_module中复制的重复文件

在APK META-INF/library_release.kotlin_module中复制的重复文件

问题描述:

我最近通过JitPack添加了两个Android库,并且出现以下错误:

I recently added two Android libraries through JitPack and I have the following error:

Duplicate files copied in APK META-INF/library_release.kotlin_module

我清除了缓存,并尝试使用排除模块

I've cleared the cached and I've tried excluding the module using

exclude group: 'org.jetbrains'

exclude group: 'org.jetbrains.kotlin'

,但似乎都无法解决问题.有什么方法可以阻止通过JitPack添加kotlin stdlib吗?奇怪的是,其他库(例如DbFlow)没有这个问题,尽管我看不到它们的设置有什么特别之处(除了它不是通过JitPack来实现的)

but neither seems to resolve the issue. Is there any way to stop the kotlin stdlib from being added through JitPack? Oddly, other libraries like DbFlow don't have this issue, though I don't see anything special about their setup (other than that it isn't through JitPack)

您应将其添加到应用程序的build.gradle文件中的android标记内

You should add this to the build.gradle file of your app inside the android tag

packagingOptions {
    exclude 'META-INF/library_release.kotlin_module'
}