[building the flutter environment] error: the flutter directory is not a clone of the GitHub project

During the installation process, enter flutter doctor to report an error:

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

resolvent

Manually create a . Git folder in the root directory of flutter
and execute flutter doctor again to start the installation

During the installation process, you may encounter errors error: unable to 'pub upgrade' shutter tool
at this time, you only need to add the following two variables to the environment variable - & gt; user variable

export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn


Read More: