错误信息:
* What went wrong: A problem occurred evaluating project ':app'. > Failed to apply plugin 'com.android.internal.application'. > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. Your current JDK is located in /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/jre You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing `org.gradle.java.home` in `gradle.properties`.
但是,我已经设置为11了,图中2种方式的11都试过了,再编译还是报错

回答:
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
你运行一下java -version 看看,你机器上的JAVA到底是什么版本的