【发布时间】:2016-05-18 00:38:21
【问题描述】:
我已经阅读了许多与此问题相关的问题,但所有问题都指向相同的解决方案 jar 在依赖项中重复。我已经检查了我的依赖项,它们没有重复的 jar,请告诉我应该如何解决这个问题
**
"Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2"
**
这是我的依赖文件
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/nextomeframework_beta1_mod.jar')
compile 'gov.nist.math:jama:1.0.3'
compile 'org.apache.commons:commons-math3:3.3'
compile 'com.google.code.gson:gson:2.2.4'
compile 'joda-time:joda-time:2.3'
compile 'com.fasterxml.jackson.core:jackson-core:2.5.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.1'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.1'
compile 'com.googlecode.efficient-java-matrix-library:core:0.26'
compile 'org.osmdroid:osmdroid-android:4.3'
compile 'org.slf4j:slf4j-simple:1.6.1'
compile 'commons-io:commons-io:2.4'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.8.5'
compile 'org.codehaus.jackson:jackson-core-asl:1.8.5'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile files('libs/concurrent.jar')
compile files('libs/Jama-1.0.3.jar')
compile files('libs/zip4j_1.3.2.jar')
【问题讨论】:
-
显然,您应该决定是使用
compile fileTree(...)添加 libs 目录中的所有 jar 还是使用compile files('libs/...)选择一个 ... 显然,使用这两个 jar 将最终添加两次库 -
不是全部,这是谷歌上的第一个结果:stackoverflow.com/questions/29756188/…
-
可能是 Multidex 问题。看这里:stackoverflow.com/a/30692005/2960788
标签: java android android-studio