Android之android studio如何解决‘:app:packageDebug‘.(Duplicate files copied in APK META-INF/DEPENDENCIES)
不废话,先爆照
今天在使用glide的时候,我在项目里面添加了httpcore-4.3.2.jar和4.3.5.jar包,但是当我运行的时候就出现了这个错误
然后在build.gradle里面配置下面的信息就好了,
android {
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'
}
}
如下图
ok 解决了
赞 (0)