SyntaxFix
Write A Post
Hire A Developer
Questions
I've just had a similar issue. The project had opened using Java 9 but even after all the modules and project were set back to 1.8, I was still getting the error.
I needed to force Gradle to refresh the project and then everything ran as expected.