Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 1
Continously getting this error everytime i try to run the project
Already added
dexOptions {
javaMaxHeapSize "4g"
}
Also, have added multidexEnabled true
in build.gradle and restarted android studio many a times, but still receiving the same error.
Not even able to run the app once.
-------------SOLVED-------------
Previously i had put environment variable in the system named _JAVA_OPTIONS
with -Xmx1024M
value and i changed it to -Xmx2048M
and it solved the issue.