Unsupported major.minor version 52.0 when rendering in Android Studio

Viewed 149056

When I try to render a layout preview in Android Studio I get error:

Unsupported major.minor version 52.0

25 Answers

Make sure to do a clean build after changing a version of Java. As it turns out Android Studio does some work when you switch the JDK but doesn't clean the workspace and creates confusion ¯\_(ツ)_/¯

This error "Unsupported major.minor version 52.0" refers to the java compiler, although the string "major.minor" looks very similar to the Android SDK version format.

On Windows platform, asides updating jdk to 1.8, make sure JAVA_HOME point to where your jdk 1.8 is installed (i.e. C:\Program Files\Java\jdk1.8.0_91).

Download latest JDK and install. Go toVS2015 Tools > Options > Xamarin and change the java to the latest JDK location

Related