Android Studio编译问题 xxx has been compiled by a more recent version of the Java Runtime

Posted Jason_Lee155

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Studio编译问题 xxx has been compiled by a more recent version of the Java Runtime相关的知识,希望对你有一定的参考价值。

随便记录一下:android studio直接build时没问题,但是general apk的时候却编译不了:

* What went wrong:
com/android/tools/idea/gradle/run/OutputBuildAction has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

有几种可能的解决办法:

第一种,多半是编译时的jdk版本不太对,切换老一点的jdk或者新一点的试试

 第二种,或者就改gradle试试

如果发现g改了gradle代码又编译不过了,哎,还能怎么办,下载安装一个老一点的Android studio吧:

 

以上是关于Android Studio编译问题 xxx has been compiled by a more recent version of the Java Runtime的主要内容,如果未能解决你的问题,请参考以下文章

Android studio打开后全报红怎么办

Android Studio升级到3.1.4后打开旧项目警告:The `android.dexOptions.incremental` property is deprecated and it ha

我的Android进阶之旅Android Studio如何彻底关闭代理?

android studio 真机测试闪退问题?

如何在Android studio上运行从github上下载的RN项目

android studio- Gradle "xxx" project refresh failed