编程知识 cdmana.com

[fluent topic] 02 illustration of installation and configuration environment under MAC environment # yyds dry goods inventory #

       I sorted out an article two days ago  Flutter 01: The illustration Windows Install and configure the environment in the environment , Tidy up today in Mac Installation and configuration in the environment Flutter. After the actual operation, I will feel , Environment configuration is the most basic , It's easy to solve by paying attention .
       Reference material : Flutter Chinese net

System environment

  1. Flutter Suggest Mac The environment is 64 position macOS (64-bit);
  2. Disk space should exceed 700M, But does not include Xcode and Android Studio Space ;
  3. Computer installed  Git;

Installation diagram

  1. terminal -> git clone -b beta  https://github.com/flutter/flutter.git, Pictured :

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_0  Based on learning  Flutter

  1. Under normal circumstances clone success , But the side dish computer is not installed XCode, The tips are as follows :
xcrun: error: invalid active developer path (/Library/Developer/
CommandLineTools), missing xcrun at: /Library/Developer/
CommandLineTools/usr/bin/xcrun

     
  • 1.
  • 2.
  • 3.
  1. Installed XCode Please skip this step , install XCode, terminal -> xcode-select --install, Probably 2-3 Minutes to install successfully , Pictured :

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_0  Based on learning  Flutter_02

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_Android  Vegetable bird _03

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_0  Based on learning  Flutter_04

  1. In China, it is also necessary to add PUB_HOSTED_URL and FLUTTER_STORAGE_BASE_URL, And set up PATH take Flutter Add to path , as follows :
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=`pwd`/flutter/bin:$PATH

export PATH=$HOME/flutter/bin:$PATH
echo $PATH

     
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.

      Tips: The file path and file name may be different on each computer , So add export PATH=$HOME/flutter/bin:$PATH, And refresh the current window .

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_Android  Vegetable bird _05

  1. In the end -> Flutter doctor, Then everything went well , Pictured :

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_Flutter  Side dish _06

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_Flutter  Side dish _07

       thus ,Flutter Environment installation configuration successful , This is combined with the last blog ,Windows and Mac The environment is set up , The first step of the long march has been completed , Next, it's time to try and study more !


      Tips: If you want to query Mac in Git route , Terminable -> which git, Pictured :

【Flutter  project 】02  The illustration  Mac  Install and configure the environment in the environment  #yyds Dry inventory #_0  Based on learning  Flutter_08


source : Little monk aze

版权声明
本文为[A Ze little monk]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/11/20211109095357328j.html

Scroll to Top