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:
Encountered same problem today. I fixed this problem by closing other applications to release more memory to finish build process.
When getting this error:
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
Use process explorer to find out the command line parameter of java.exe, then run complete command in CMD window to see what the error message is. Mine contains "HeapDumpOnOutOfMemoryError", So I close other applications to release more memory, then problem fixed.