【发布时间】:2015-11-01 22:45:49
【问题描述】:
我在项目中使用以下 2 个库 1. spring-core-3.1.0.RELEASE.jar 2. spring-web-3.1.0.RELEASE.jar
但 android studio 正在考虑上述库的重复条目并在打包时出错。
Error:duplicate files during packaging of APK E:\Code\iDoc\app\build\outputs\apk\app-debug-unaligned.apk
Path in archive: META-INF/license.txt
Origin 1: E:\Code\iDoc\app\libs\spring-core-3.1.0.RELEASE.jar
Origin 2: E:\Code\iDoc\app\libs\spring-web-3.1.0.RELEASE.jar
You can ignore those files in your build.gradle:
android {
packagingOptions {
exclude 'META-INF/license.txt'
}
}
------------------------------------------------------------
有人遇到过类似的问题吗?
请针对此错误提出一些解决方法。
【问题讨论】: