This question already has an answer here:
这个问题已经有了答案:
- Unsupported major.minor version 52.0 when rendering in Android Studio 25 answers
- 不支持的专业。当在Android Studio 25中呈现时,小版本52.0回答
How the fix the gradle error in Android studio after update preview 3?
如何修复升级预览3后在Android studio中的等级错误?
2 个解决方案
#1
18
You should download the latest jdk
您应该下载最新的jdk
Install it.
安装它。
Then in Android Studio go to:
然后在安卓工作室
File-->Other Settings-->Default Project Structure
文件- - >其他设置- - >默认项目结构
And change the location of the JDK Location for the new one:
并更改新版本的JDK位置的位置:
Also set your java home to 1.8 by command line:
还可以将java home设置为1.8 by命令行:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
#2
3
I had to update my Android Studio to the latest version to solve the problem. My JAVA_HOME and JDK were well configurated and was not a problem of compilation/running version. I don't know why, but just solve it when I updated AS to latest version.
为了解决这个问题,我不得不将我的Android Studio升级到最新版本。我的JAVA_HOME和JDK配置良好,并不是编译/运行版本的问题。我不知道为什么,但当我更新到最新版本时就可以解决了。
#1
18
You should download the latest jdk
您应该下载最新的jdk
Install it.
安装它。
Then in Android Studio go to:
然后在安卓工作室
File-->Other Settings-->Default Project Structure
文件- - >其他设置- - >默认项目结构
And change the location of the JDK Location for the new one:
并更改新版本的JDK位置的位置:
Also set your java home to 1.8 by command line:
还可以将java home设置为1.8 by命令行:
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
#2
3
I had to update my Android Studio to the latest version to solve the problem. My JAVA_HOME and JDK were well configurated and was not a problem of compilation/running version. I don't know why, but just solve it when I updated AS to latest version.
为了解决这个问题,我不得不将我的Android Studio升级到最新版本。我的JAVA_HOME和JDK配置良好,并不是编译/运行版本的问题。我不知道为什么,但当我更新到最新版本时就可以解决了。