【问题标题】:I get this error when trying to run an app via flutter on vscode尝试在 vscode 上通过颤振运行应用程序时出现此错误
【发布时间】:2021-09-20 21:26:44
【问题描述】:

我刚刚在 VS Code 中完成了 Flutter 的设置,我创建了一个 android 模拟器,它运行良好,但是当我尝试启动 Flutter 的演示应用时,我得到了这个错误:

Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Parameter format not correct -

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 'C:\Program Files\Java\jre1.8.0_291' 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 4s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

有什么问题?

【问题讨论】:

    标签: android flutter visual-studio-code


    【解决方案1】:

    安装Android Studio,如果你是新手,这是必须的,你可以随时使用VSCODE进行开发,但Android Studio需要在那里。

    最好的方法是卸载vscode,安装android studio,在android studio中安装flutter和dart插件,然后安装vscode,就可以了。

    也尝试运行

    颤抖的医生

    它说了什么?

    【讨论】:

    • 我有 android studio,我尝试安装和卸载 vscode,文档说:[!] Android Studio (version 3.5) X Unable to find bundled Java version.
    猜你喜欢
    • 1970-01-01
    • 2021-08-09
    • 2021-12-24
    • 2020-02-23
    • 2021-09-02
    • 1970-01-01
    • 2020-02-20
    • 2022-01-25
    • 2022-01-09
    相关资源
    最近更新 更多