【问题标题】:Flutter - VS Code Flutter Emulator is brokenFlutter - VS Code Flutter 模拟器坏了
【发布时间】:2021-07-31 08:05:25
【问题描述】:

我想从 VS Code 为 Flutter 项目运行 Android Emulator。 但是,结果,我得到了这个:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Kotlin could not find the required JDK tools in the Java installation '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home' used by Gradle. Make sure Gradle is running on a JDK, not JRE.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Exception: Gradle task assembleDebug failed with exit code 1


有趣的是,我可以从 Android Studio 运行应用程序,但不能从 VS Code 运行。 这如何以及为什么可能? :)

谢谢!

【问题讨论】:

    标签: java android flutter


    【解决方案1】:

    您可能拥有 Java 16,请尝试安装 Java 11 或 Java 8 Google 需要将自己从所有涉及 java 的事物中解放出来。设置所有东西太无聊了。

    【讨论】:

      猜你喜欢
      • 2021-02-13
      • 1970-01-01
      • 2019-04-28
      • 2019-12-22
      • 2019-03-18
      • 2020-09-19
      • 1970-01-01
      • 2020-10-04
      • 2020-08-12
      相关资源
      最近更新 更多