[英]app:dexDebug error in build.gradle Android Studio
尝试在Android Studio上运行项目时,我收到app:dexDebug错误。 我相信这与我的依赖关系有关,但我不确定我要去哪里。
错误是:
错误:任务':app:dexDebug'的执行失败。
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\\ Program Files \\ Java \\ jdk1.7.0_17 \\ bin \\ java.exe'以非零退出值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'
}
任何人都可以在这里指出正确的方向。
谢谢。
更新
通过将以下内容添加到我的build.gradle中来解决问题
packagingOptions {
exclude 'META-INF/license.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/notice.txt'
exclude 'META-INF/NOTICE'
}
Android Studio中Error:Execution failed for task ':app:dexDebug'
来解决它设置multiDexEnabled
到true
在你的文件的gradle。
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.