Even though I manually configured JDK project structure file/Project structure it still shows this error FAILURE: Build failed with an exception.
`What went wrong:
I had the same problem and fixed it like this: