Try cleaning your daemons with ./gradlew --stop
. It works for me.
This was my error. also sometimes I got an IDLE at the end of the build and never ends.
* What went wrong:
Execution failed for task ':test'.
> A problem occurred starting process 'Gradle Test Executor 1'