adafrwefsefr adafrwefsefr - 1 year ago 166
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'.
> 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: ''

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

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

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ''

What does that means?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download