安裝flutter以后很多同學使用的臨時路徑? 每次打開終端都需要重新export 路徑
設置永久路徑也沒少爬坑,現(xiàn)在給出我的解決方案:
終端:open $HOME/.bash_profile
打開后添加:
export PATH=~flutter/bin:$PATH? ? ? ? //(此路徑為本地flutter路徑)
//下面為本來就有的東西
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
關(guān)閉,然后終端:source $HOME/.bash_profile
接著終端:open ~/.zshrc?
在最上面添加:
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
source ~/.bash_profile
關(guān)閉,然后終端:source?~/.zshrc?
然后就可以隨意flutter命令了
如果還不行:
終端:open ~/.bashrc?
改成這樣:
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH=~/flutter/bin:$PATH? ? ? ? //(此路徑為本地flutter路徑)
關(guān)閉,然后終端:source ~/.bashrc
$HOME/.bash_profile? ? ??~/.bashrc? ?兩個文件改其一就可以??