之前使用的android studio版本是4.1.3
更新到Android Studio Dolphin | 2021.3.1 Patch 1后允许工程提示Cause: 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
解决方法
出现这个问题的原因是android更新后使用的是java11进行编译,需要更新jdk
可以这样设置



评论区