【问题标题】:While using "flutter run" in VS Code terminal, The terminal changing automatically to current working directory在 VS Code 终端中使用“flutter run”时,终端会自动切换到当前工作目录
【发布时间】:2021-11-05 20:09:17
【问题描述】:

在我的项目中,我创建了一个子目录来维护它。但是在我的 main.dart 文件所在的目录中使用“flutter run”时,终端会自动切换到当前工作目录,并显示

找不到目标文件“lib\main.dart”。

我该如何解决?

【问题讨论】:

    标签: flutter visual-studio-code vscode-settings


    【解决方案1】:

    您可以使用带有-t 参数的特定目标文件运行:

    flutter run -t example/main.dart

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-10-26
      • 2020-06-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-08
      相关资源
      最近更新 更多