Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 648
adafrwefsefr Avatar asked May 23 '15 07:05

adafrwefsefr


2 Answers

I got this error when I used the beta version of gradle to test Vector Asset. This error perssisted even after I switched back to stable Gradle version 1.3.0.
The error was fixed after I used Build > Clean project

like image 105
vovahost Avatar answered Nov 07 '22 22:11

vovahost


Just add below line in your app Gradle dependencies

compile 'com.android.support:multidex:1.0.0'

and then below line in defaultConfig

multiDexEnabled true
like image 6
Bajirao Shinde Avatar answered Nov 07 '22 22:11

Bajirao Shinde