简体   繁体   English

当我尝试在 vs 代码中运行我的 flutter 时,它在调试控制台中给出了这个错误

[英]when I've tried to run my flutter in vs code it gave this error in debug console

Could not find an option with short name "-n".找不到具有短名称“-n”的选项。

Run 'flutter -h' (or 'flutter -h') for available flutter commands and options.运行“flutter -h”(或“flutter -h”)以获取可用的 flutter 命令和选项。 Exited (64)退出 (64)

can you elaborate what you mean by你能详细说明你的意思吗

when I've tried to run my flutter in VS Code当我尝试在 VS Code 中运行我的 flutter

More specifically进一步来说

  1. which command you are trying to run and seeing the above error?您尝试运行哪个命令并看到上述错误?
  2. What's your current flutter version?您当前的 flutter 版本是什么?

It sounds like some unexpected arguments are being passed to flutter when you try to run.当您尝试运行时,听起来有些意外的 arguments 正在传递给flutter These could come from a few different places:这些可能来自几个不同的地方:

  • Check if you have a .vscode/launch.json file, and whether you have anything unexpected in the args检查您是否有.vscode/launch.json文件,以及args中是否有任何意外
  • Check the "Flutter Additional Args" and other similar settings in VS Code检查 VS Code 中的“Flutter Additional Args”和其他类似设置

To find out exactly what command VS Code is trying to run:要准确找出 VS Code 试图运行的命令:

  • Run the Dart: Capture Debugging Logs command from the command palette从命令面板运行Dart:捕获调试日志命令
  • Try to run the app to generate the error尝试运行应用程序以生成错误
  • Click Cancel on the logging notification to stop logging and open the log file单击日志记录通知上的取消以停止日志记录并打开日志文件
  • Search the log file for "Spawning" and it should show the full command VS Code is trying to run在日志文件中搜索“Spawning”,它应该显示 VS Code 尝试运行的完整命令

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当我在真实设备上点击颤振运行时,在 VS Code 中显示错误 - flutter In VS Code show error when I hit flutter run on my real device 我在我尝试过的 flutter 代码中遇到了这些错误(flutter clean - flutter pub get - flutter 升级 - 缓存修复)所有这些都不起作用 - I got these error in my flutter code I've tried (flutter clean - flutter pub get - flutter upgrade - cache repair) all of it didn't work 当我运行代码 gradle 任务需要太长时间时,我的 flutter 应用程序出现问题 我尝试了 flutter 医生,它说一切都正确,然后错误 - i have problem with my flutter app when i run the code gradle task takes too long i tried flutter doctor ,it says that all things is right ,then error 当我尝试在 Android 移动设备或模拟器中运行时,我的 Flutter 应用程序显示错误 - My Flutter Application is showing error when i tried to run in android mobile or an emulator 当我运行我的代码时,它会给出错误代码 400,但是当我进行热刷新时,它会在控制台中显示数据,同时从 flutter 中的 api 获取数据 - when i run my code it gives error code 400 but when i do hot refresh it shows data in console while getting data from api in flutter 当我运行“ flutter build aot --debug ”错误时? - when I run " flutter build aot --debug " error? 当我尝试运行旧的android项目时,在android studio中显示安装生成工具25.0.3错误 - Install build tools 25.0.3 error showing in android studio when i tried to run my old android project 错误:当我尝试使用2.2运行项目时,它给出了错误 - Error: when i tried to run running project with 2.2 then it gives error 当我尝试从一种意图转到另一种意图时,我正在使用的应用程序崩溃了,我已经尝试了所有方法。 码: - The app I am working on crashes when i try to go from one intent to the other, I've tried everything. code: 当我尝试在android studio中运行我的应用程序时出现此错误。 有谁知道如何解决这个问题? - I got this error when I tried to run my app in android studio. Does anyone know how to solve this problem?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM