【发布时间】: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 运行。 这如何以及为什么可能? :)
谢谢!
【问题讨论】: