我在Intellij中使用空活动创建了一个Android项目。然后我将Jersey库添加为gradle中的依赖项,如下所示:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
// dependencies I added
compile 'com.sun.jersey:jersey-server:1.19'
compile 'com.sun.jersey:jersey-json:1.19'
}
它开始显示以下错误:
任务执行失败':app:preDexDebug'。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ Program Files \ Java \ jdk1.7.0_80 \ bin \的java.exe''完成非零退出值1
答案 0 :(得分:0)
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'
}