简体   繁体   English

Flutter 命令未找到 / flutter 医生

[英]Flutter command not found / flutter doctor

What I've tried: Adding/ editing the.bash_profile.rtf file to where the flutter SDK is contained.. export PATH=/Users/temur/Documents/Projects/Flutter/tools/flutter/bin:$PATH我试过的:将.bash_profile.rtf文件添加/编辑到包含flutter SDK的位置.. export PATH=/Users/temur/Documents/Projects/Flutter/tools/flutter/bin:$PATH

after this, I try to run flutter doctor on terminal I get command not found.在此之后,我尝试在终端上运行 flutter 医生,但找不到命令。

even in the path.甚至在路上。

Now, if I just copy+ paste the above command in terminal, it works.现在,如果我只是在终端中复制+粘贴上述命令,它就可以工作。 Though, it only works until the terminal is exited.但是,它仅在退出终端之前有效。

Any way for terminal to read the bash profile file?终端有什么方法可以读取 bash 配置文件?

Figured it out;弄清楚了; entered command: echo $PATH输入命令:echo $PATH

spit out;吐出; /Users/temur/Projects/Flutter/tools/flutter/bin :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/Apple/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands /Users/temur/Projects/Flutter/tools/flutter/bin :/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Library/苹果/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands

which was different than the one that should be in my.bash_profile这与应该在 my.bash_profile 中的不同

/Users/temur/Documents/Projects/Flutter/tools/flutter/bin /Users/temur/Documents/Projects/Flutter/tools/flutter/bin

Had to change this in my bash profile file.必须在我的 bash 配置文件中更改它。

Also, reverting my terminal to bash from zsh helped.此外,将我的终端从 zsh 恢复为 bash 也有帮助。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM