问题: DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
原因:重复的META-INF/LICENSE导入
解决方法: 一般情况下只需要exclude ‘META-INF/LICENSE’ 就可以了。
其他的:
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
本文介绍了解决在构建APK过程中遇到的DuplicateFileException问题的方法。通常此问题由重复的META-INF文件引起,文中提供了具体的exclude选项来排除这些重复文件。
3万+

被折叠的 条评论
为什么被折叠?



