1.官網下載sdk,解壓后到你想要放的檔案目錄下,后解壓
注意:下載的sdk解壓后是flutter檔案夾并且里面有.git檔案,不然會報下面的錯誤
Error: The Flutter directory is not a clone of the GitHub project.
The flutter tool requires Git in order to operate properly;
to set up Flutter, run the following command:
git clone -b beta https://github.com/flutter/flutter.git
2.找到你電腦的.bash_profile檔案(沒有就新建),寫上下面的代碼
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH='你安裝flutter SDK路徑'/flutter/bin:$PATH
3.再修改組態檔.zshrc,在檔案末尾加上這句:source ~/.bash_profile
4.重新退出終端(一定要退出)后再打開終端執行$ source ~/.bash_profile 即可
5.執行 flutter doctor 查看是否配置成功
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/233549.html
標籤:區塊鏈
