Duplicate files copied (Android Studio)
16lz
2021-01-23
In my project I use httpcore and httpmime libraries from Apache. After update Android Studio to 0.4.0 I have this issue building my project:
Duplicate files copied in APK META-INF/DEPENDENCIESFile 1: /home/slava/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.3.1/f7899276dddd01d8a42ecfe27e7031fcf9824422/httpmime-4.3.1.jarFile 2: /home/slava/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.3.1/f7899276dddd01d8a42ecfe27e7031fcf9824422/httpmime-4.3.1.jar
解决方式:
Follow the advice Gradle gives you at the end of the build. In my case it told me to add:
android { packagingOptions { exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } // ...}
更多相关文章
- Android关于桌面快捷方式工具类!
- Android菜单实现两种方式
- 我今天的面试题,注册广播有几种方式,这些方式有何优缺点?请谈谈Andr
- Android 代码设置Color的几种方式
- Android控件隐藏方式 .
- Android客户端与服务端交互-客户端GET方式登录和客户端POST方式
- Android获取存储卡路径的方式
- android 使用gdb调试的方式