Unsupported major.minor version 52.0 when renderin

2019-01-03 05:38发布

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

Unsupported major.minor version 52.0

25条回答
劳资没心,怎么记你
2楼-- · 2019-01-03 06:06

With the latest version, you are recommended to switch to the embedded JDK like in the image below, and this will solve your error

resolve major.minor version 52.0 error

查看更多
Emotional °昔
3楼-- · 2019-01-03 06:10

Changing to Java SDK to Java 8 and worked for me

Android Studio settings:

File > other settings > Default project structure > JDK location > jdk1.8.0_71.jdk/Contents/Home enter image description here

查看更多
疯言疯语
4楼-- · 2019-01-03 06:11

For my case, my original Android SDK Build-tools version is 24 and Andoid SDK Tools version is 25.1.7. I install Android SDK Build-tools version 23.0.3 by Andoird SDK manager.

Modify these 2 lines to:

buildToolsVersion "23.0.3" compileSdkVersion 24

Then it works!

查看更多
▲ chillily
5楼-- · 2019-01-03 06:12

Changing to Java SDK to Java 8 worked for me. Android Studio settings: File -> other settings ->Default project structure -> JDK location -> jdk1.8.0_71.jdk/Contents/Home

查看更多
地球回转人心会变
6楼-- · 2019-01-03 06:13

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

查看更多
一夜七次
7楼-- · 2019-01-03 06:14

For me, updating the Android Studio to the latest version solved the problem.

查看更多
登录 后发表回答