在APK META-INF/library_release.kotlin_module中复制的重复文件 [英] Duplicate files copied in APK META-INF/library_release.kotlin_module

查看:1213
本文介绍了在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'
}

这篇关于在APK META-INF/library_release.kotlin_module中复制的重复文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆