术语“打开”未被识别为cmdlet的名称

时间:2019-09-02 21:34:45

标签: flutter dart

我尝试打开模拟器,但是VSCode告诉我:

open : The term 'open' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path 
was included, verify that the path is correct and try again.
At line:1 char:1
+ open -a simulator
+ ~~~~
    + CategoryInfo          : ObjectNotFound: (open:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

1 个答案:

答案 0 :(得分:-1)

PowerShell的搜索路径与bashsh不同。要在macOS上从PowerShell打开模拟器,您需要:

/usr/bin/open -a simulator