![](/img/trans.png)
[英]Unable to run flutter app on android emulator as java as Android Gradle plugin requires Java 11 to run
[英]Android gradle plugin requires java 11
这真的让我很沮丧,我为此寻找解决方案,但我没有任何工作。 if check on terminal my java version, it's version 16 but when i try to run flutter in android emulator it read java 1.8. 我在 macOS Monterey 和 msvcode 上运行
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.
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`.
1.在 Android Studio 中,导航到 File -> Project Structure 或按 Ctrl+Alt+Shift+S 打开项目结构。
2.In Platform Settings -> SDKS -> Android API -> Java SDK (Now choose JDK as per your requirement).
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.