為您解碼網(wǎng)站建設(shè)的點(diǎn)點(diǎn)滴滴
發(fā)表日期:2018-11 文章編輯:小燈 瀏覽次數(shù):2364
官網(wǎng)攻略傳送門:https://flutter.io/docs/get-started/install/macos
1.下載好對(duì)應(yīng)的flutter包,大概400多M,下載后丟到document目錄下。
2.打開終端。
1.cd到flutter目錄 2.export PATH=$PATH:`pwd`/flutter/bin 3.vim $HOME/.bash_profile 4.添加 export PATH=/Users/pengweijun/Documents/flutter/bin:$PATH 進(jìn)去具體看下圖A 5.source $HOME/.bash_profile 6.flutter --version 看看效果正常情況如下圖B(這里下載的是flutter 0.9.4)bingo! 然后理論上就可以開心的擼flutter了
如果有小伙伴的mac裝了zsh經(jīng)過了上述配置攻略步驟會(huì)發(fā)現(xiàn)無論如何改都不生效(cmd+N一個(gè)新的終端驗(yàn)證flutter --version發(fā)現(xiàn)不能識(shí)別到flutter,然后查看$PATH發(fā)現(xiàn) 明明剛才已經(jīng)加上的flutter路徑就是不生效。
解決方案 1.在終端vim .zshrc 把上述在 $HOME/.bash_profile添加那句貼過來 2.source .zshrc原因:應(yīng)該是zsh環(huán)境會(huì)把系統(tǒng)默認(rèn)bash環(huán)境本來走bash_profile的時(shí)候變成走到 .zshrc Done!
參考鏈接:http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
日期:2018-10 瀏覽次數(shù):7551
日期:2018-12 瀏覽次數(shù):4636
日期:2018-07 瀏覽次數(shù):5146
日期:2018-12 瀏覽次數(shù):4425
日期:2018-09 瀏覽次數(shù):5788
日期:2018-12 瀏覽次數(shù):10206
日期:2018-11 瀏覽次數(shù):5118
日期:2018-07 瀏覽次數(shù):4866
日期:2018-05 瀏覽次數(shù):5123
日期:2018-12 瀏覽次數(shù):4595
日期:2018-10 瀏覽次數(shù):5402
日期:2018-12 瀏覽次數(shù):6470
日期:2018-11 瀏覽次數(shù):4724
日期:2018-08 瀏覽次數(shù):4876
日期:2018-11 瀏覽次數(shù):13026
日期:2018-09 瀏覽次數(shù):5890
日期:2018-12 瀏覽次數(shù):5106
日期:2018-10 瀏覽次數(shù):4452
日期:2018-11 瀏覽次數(shù):4804
日期:2018-12 瀏覽次數(shù):6329
日期:2018-06 瀏覽次數(shù):4272
日期:2018-08 瀏覽次數(shù):5718
日期:2018-10 瀏覽次數(shù):4709
日期:2018-12 瀏覽次數(shù):4828
日期:2018-07 瀏覽次數(shù):4638
日期:2018-12 瀏覽次數(shù):4812
日期:2018-06 瀏覽次數(shù):4643
日期:2018-11 瀏覽次數(shù):4628
日期:2018-12 瀏覽次數(shù):4563
日期:2018-12 瀏覽次數(shù):5540
Copyright ? 2013-2018 Tadeng NetWork Technology Co., LTD. All Rights Reserved.