flutter “bin/sh:省道:在VSCode中找不到”命令

vngu2lb8  于 2022-12-24  发布在  Flutter
关注(0)|答案(1)|浏览(204)

我试图运行flutter和dart使用教程,但我坚持这个错误:

/bin/sh: dart: command not found

这是我在VS代码中的用户设置:

"dart.flutterSdkPath": "/Users/sam/Desktop/Codeground/App_development/flutter/bin"

而在.bash_profile中,则是这样写的:

export PATH="$PATH:/Users/sam/Desktop/Codeground/App_development/flutter/bin"

我已经尝试添加另一个路径到dart-sdk/bin子文件夹,但没有效果。我运行的是MacOS Ventura 13.0.1
我在试着逃跑:

dart "/Users/sam/Desktop/Codeground/App_development/Projects/sample_application/lib/main.dart"
laik7k3q

laik7k3q1#

您可以尝试使用$HOME,确保路径的其余部分。

export PATH="$PATH:$HOME/Desktop/Codeground/App_development/flutter/bin"

相关问题