[英]I get this error when trying to run an app via flutter on vscode
我剛剛在 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 Studio,如果你是新手,這是必須的,你可以隨時使用 VSCODE 進行開發,但 Android Studio 需要在那里。
最好的方法是卸載vscode,安裝android studio,在android studio中安裝flutter和dart插件,然后安裝vscode,就可以了。
也嘗試運行
撲醫生
它說什么?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.