小编Joh*_*ohn的帖子

Visual Studio Code:找不到飞镖

我刚开始使用 Flutter,可以在 Android Studio 中运行我的 Flutter 应用程序。我想尝试 Visual Studio Code,但是当我单击运行按钮时,我在输出窗口中看到了这个:

[Running] dart 
"c:\MyStuff\Source\Flutter\hello_world\test\widget_test.dart"
'dart' is not recognized as an internal or external command,
operable program or batch file.

[Done] exited with code=1 in 0.199 seconds
Run Code Online (Sandbox Code Playgroud)

我的第一个想法是我的 Path 环境变量,我试图让它发挥作用。它看起来像这样:

%USERPROFILE%\AppData\Local\Microsoft\WindowsApps; c:\Flutter\bin; 
c:\temp\flutter; c:\windows\system32; 
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; 
C:\temp\Flutter\bin\cache\dart-sdk.old1\bin
Run Code Online (Sandbox Code Playgroud)

我的 c:\temp\Flutter 目录如下所示:

https://i.stack.imgur.com/584fj.jpg

(我把它包括在内是因为我有点迷茫,希望有人能发现我做错了什么。)

有没有人知道我做错了什么?这似乎应该只是基本设置,但我显然把它搞砸了。:(

编辑:

感谢您的回复!我确实做了第一件事。Flutter 医生给了我这个:

[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[?] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 
10.0.16299.547], locale en-US)
[!] Android …
Run Code Online (Sandbox Code Playgroud)

visual-studio-code flutter

5
推荐指数
1
解决办法
2万
查看次数

标签 统计

flutter ×1

visual-studio-code ×1