I used gradle build command in Centos 7 terminal and I got output:
FAILURE: Build failed with an exception. * What we
For future reference. I had the same problem, the issue was that the antivirus was blocking OpenJdk platform binary and java.exe which prevented android studio from being able to modify the files