preface
Xiaobian bought a new Asus computer, so the environment needs to be rebuilt, in order to prevent the newcomers from taking many detours (essentially, afraid of forgetting). The environment building tutorial came into being. Start by downloading Android Studio.
A, Android Studio
- download
You can go to the official website to download directly or to the Chinese community to download, here will not give the link, baidu directly good.
- The installation
There are many installation tutorials on the web, so I won’t go into details. Here is a reference link.
Note: There was a problem with android Studio’s virtual machine installation because I bought an AMD CPU. The VM cannot run.
A possible solution was found online:
- Press the Win key to search for Hyper and turn on or off Windows features.
- Locate VM Platform and select it.
After the computer restarts, the virtual machine is up and running!
Ii. Build the Environment of Flutter
- Use temporary images. The user environment variables are configured as follows:
PUB_HOSTED_URL=https://pub.flutter-io.cn Copy the code
FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn Copy the code
- Download the available installation package from the official website.
Decompress the package zip to the folder where you want to install the Flutter SDK, for example: D:\ Flutter Update the Flutter environment variables. Configure the full Path of the Flutter \bin to the “Path” entry in the “user variables”.
- Run the flutter doctor command.
When xiaobian dutifully taps the Flutter Doctor command, wait a moment, dude! This is certainly not what I expected.
The second error message did not find the Android SDK. Solution: Open the environment variable and add ANDROID_HOME to the user environment variable, just put your SDK path there.
Run the Flutter Doctor again. Hey hey! There was no red this time.
Flutter doctor — Android-licenses, press Y all the time. Then open Android Studio to install the Flutter and DART dependencies, and file->Settings->Plugins to search for the install. Then start the virtual machine.
Run the Flutter Doctor again.
Finally, create a Flutter project, open the vm, run! O (≧ ヾ del ≦ *)
VSCode configures the FLUTTER environment
Before I changed my computer, running the Flutter project with Android Studio+ VIRTUAL machine was very difficult. Therefore, configuring VSCode to run the Flutter project was very difficult.
- Open the VSCode extension and search for flutter installations. VSCode will automatically install the Dart dependencies as well.
- Ctrl+Shift+P Enter flutter and select Flutter :New Application Project To create a flutter Project.
- run!
conclusion
A bad pen is better than a good memory. Environment building is also the first step in learning Flutter. While recording, I also hope to give some help to XDM.