adafrwefsefr adafrwefsefr - 1 month ago 6
Java Question

Android Studio-Java.exe is finished with non-zero exit value 2

When I try to Run my app, I am getting this error:-

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


UPDATED:- Here is my Build.gradle(Module:app) file

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "navigationdrawer.tutecentral.com.navigationdrawer"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
}


What does that means?

Answer

This happened for me when I was refactoring some class files to a library project and I had a duplicate name of a class file. So, double check that you do not have any duplicate names. This also appears to be a duplicate of the question here: android project: process finished with non-zero exit value 2

Comments