Android Studio-Java.exe is finished with non-zero exit value 2

前端 未结 7 889
故里飘歌
故里飘歌 2021-01-13 05:07

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:          


        
7条回答
  •  生来不讨喜
    2021-01-13 05:36

    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.

提交回复
热议问题