我收到应用程序:试图在Android Studio上运行我的项目时出现dexDebug错误。我相信这与我的依赖有关,但我不确定我出错的地方。应用:build.gradle中的dexDebug错误Android Studio
的错误是:
错误:执行失败的任务 ':应用程序:dexDebug'。是
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_17\bin\java.exe'' finished with non-zero exit value 2
我在的build.gradle文件依赖性如下:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2'
}
任何人都可以点我在正确的方向在这里,请。
谢谢。
UPDATE
问题通过添加解决以下我的build.gradle
packagingOptions {
exclude 'META-INF/license.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice.txt'
exclude 'META-INF/NOTICE'
}
你是否确实使用过搜索功能? http://stackoverflow.com/questions/28429546/how-to-fix-this-gradle-appdexdebug-error Regards – sehe
我知道相同的库是为了相同的版本,但我怎么能够定义' com.android.support:design'来匹配'com.android.support:appcompat'?你不能简单地把'com.android.support:design-v7',所以我正在寻找援助,因为我是这个发展的新手。 – User10