错误:: APK的包装过程中重复的文件 [英] Error :: duplicate files during packaging of APK
本文介绍了错误:: APK的包装过程中重复的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Android的工作室。我得到这样那样的错误应用程序运行过程中。
错误:执行失败的任务:应用程序:packageDebug。重复notice.txt
的build.gradle
应用插件:'机器人'安卓{
compileSdkVersion 19
buildToolsVersion19.0.1 packagingOptions {
排除META-INF /相关内容
排除META-INF /注意事项
排除META-INF / LICENSE
排除META-INF / LICENSE.TXT
排除META-INF / NOTICE.txt
排除META-INF / ASL2.0
} defaultConfig {
7的minSdkVersion
targetSdkVersion 19
版本code 1
的versionName1.0
}
buildTypes {
发布 {
runProguard假
proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard的-rules.txt
}
}
}依赖{
编译com.android.support:appcompat-v7:19.0.1
编译com.j256.ormlite:ormlite-机器人:4.48
编译组织codehaus.jackson:杰克逊核心翔升:1.9.13
编译组织codehaus.jackson:杰克逊映射器-ASL:1.9.13
编译com.octo.android.robospice:robospice:1.4.11
编译com.octo.android.robospice:robospice簧的Android版本:1.4.11
}
如何解决这个问题?
EDITED
这些排除选项的解决我的问题:
packagingOptions {
排除META-INF /相关内容
排除META-INF / LICENSE
排除META-INF / LICENSE.TXT
排除META-INF / LICENSE.TXT
排除META-INF /注意事项
排除META-INF / NOTICE.txt
排除META-INF / notice.txt
排除META-INF / ASL2.0
}
解决方案
我觉得字符串比较是区分大小写的。与尝试排除META-INF / notice.txt
Android Studio. I'm getting this kind of error during application run.
Error:Execution failed for task ':app:packageDebug'. Duplicate files copied in APK META-INF/notice.txt
build.gradle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ASL2.0'
}
defaultConfig {
minSdkVersion 7
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:19.0.1'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
compile 'com.octo.android.robospice:robospice:1.4.11'
compile 'com.octo.android.robospice:robospice-spring-android:1.4.11'
}
How can I fix this error?
EDITED
These exclude options solved my problem:
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
解决方案
I think the string comparison is case sensitive. try with exclude 'META-INF/notice.txt'
这篇关于错误:: APK的包装过程中重复的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文