【发布时间】:2016-04-24 10:25:36
【问题描述】:
错误:Gradle:任务 ':app:dexDebug' 执行失败。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/java/jdk1.8.0_73/bin/java'' 用非完成零退出值 2
这个错误出现在我所有的项目中
build.gradle 文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.mukesh.airpollution"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1'
}
dependencies {
compile 'com.android.support:recyclerview-v7:23.1.1'
}
dependencies {
compile 'com.loopj.android:android-async-http:1.4.4'
}
dependencies {
compile 'com.google.code.gson:gson:2.2.4'
}
dependencies {
compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.maps.android:android-maps-utils:0.4+'
}
【问题讨论】:
-
发布您的 build.gradle 文件。
-
这可能是一个多索引问题。尝试应用多索引支持。见stackoverflow.com/questions/32407985/…
-
@MonishKamble 添加了 gradle 文件
-
@DevrimTuncer 这并不总是一个解决方案...@Martin,请参阅this post
-
你真的应该压缩所有
dependencies部分......你只需要一个单个一个。
标签: android android-gradle-plugin