Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio java.exe finished with non-zero exit value 3

I have pass through non-zero exit value 1,2, related to multidex issue, but now I am getting non-zero exit value 3.

Studio Message :

Information:Gradle: Executing tasks: [:emoticons_lib_proj:assembleDebug, :myProject_Developement:assembleDebug]
Information:5/27/2015 5:56 PM - Compilation completed with 1 error and 0 warnings in 5m 58s 77ms
Error:Gradle: Execution failed for task ':myProject_Developement:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_20\bin\java.exe'' finished with non-zero exit value 3

I hope someone might have faced the issue and fixed. kindly let me know where I am misleading,

like image 836
Abdul Wahab Avatar asked May 27 '15 13:05

Abdul Wahab


1 Answers

When your project contains large number of classes, android studio will throw out non-zero exit value 3 error.

To solve the error, add this in build.gradle file and sync project with gradle.

dexOptions {
    javaMaxHeapSize "4g"
}
like image 142
ishwor kafley Avatar answered Nov 07 '22 13:11

ishwor kafley