Execution failed for task :app:testDebugUnitTest in Android studio

Viewed 1326

Suddenly build failed in my project and try to run assemble from gradle option Android studio below error log showinng

TaskExecutionException: Execution failed for task ':app:testDebugUnitTest'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:207)
       .....
Caused by: org.gradle.process.internal.ExecException: Process 'Gradle Test Executor 1' finished with non-zero exit value 1
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:417)

Any help would be great.

1 Answers

Try to see if you gradle.properties is proper configured and if the line of jvm arguments is not commented.

gradle.properties image

When this line is commented or when the parameter -Xmx2048m is with a low value, you will have out of JVM memory error that is the root cause of app:testDebugUnitTest failure.

Related