[英]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.