When upgrading to IntelliJ IDEA 2017.2, the following error is shown:
Error:com/android/builder/model/AndroidProject : Unsupported major.minor version 52.0. Please use JDK 8 or newer.
It seems that there is a new coupling for the Gradle integration with Android projects, not sure if this is intended but this is probably a bug in IntelliJ IDEA.
As discovered by @LiHaoTan, the workaround is simple - just change the Gradle JVM settings to Java 8 in IntelliJ preferences (the main project SDK remains at Java 7 and works fine).
There seems to be an issue changing the Gradle JVM to Java 8 as IntelliJ will force the project SDK to be Java 8 as well.
The workaround from Jetbrains is to temporarily disable the Android Support plugin until Jetbrains pushes an update for the fix.
The fix has been pushed through IntelliJ IDEA 2017.2.2 since August 15, 2017 and this issue can now be closed.
@whipermr5 looks good for your solution currently,thanks
Most helpful comment
As discovered by @LiHaoTan, the workaround is simple - just change the Gradle JVM settings to Java 8 in IntelliJ preferences (the main project SDK remains at Java 7 and works fine).