Unsupported major.minor version 52.0 when rendering in Android Studio

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

Unsupported major.minor version 52.0


Solution 1:

Check your JAVA_HOME to use jdk 1.8

Also check : the parameter in Android Studio in order to change at

File->Other Settings->Default Project Structure->SDKs

Solution 2:

This is bug in Android Studio. Usually you get error: Unsupported major.minor version 52.0

WORKAROUND: If you have installed Android N, change Android rendering version with older one and the problem will disappear.

SOLUTION: Install Android SDK Tools 25.1.3 (tools) or higher

enter image description here

Solution 3:

I've all done, setting JAVA_HOME, JAVA8_HOME, ... and i had always the error. For me the solution was to set the version 2.1.0 of gradle to work with Jdk 1.8.0_92 and android studio 2.11

dependencies {
    classpath 'com.android.tools.build:gradle:2.1.0'
    //classpath 'com.android.tools.build:gradle:2.+'
}