According to documentation https://flutterchina.club/setup-macos/
If you can not over the wall, I've got one on Baidu cloud disk, there is a need to download
link: https://pan.baidu.com/s/1j66GzFWypthf75JmAFF40w extraction code: vmhw copy the contents of this open Baidu network disk phone App, the operation more convenient oh
Question 1:
// 下载下来的 flutter 安装的目录
cd ~/development
// ~/Downloads 你要安装的目录
unzip ~/Downloads/flutter_macos_v0.5.1-beta.zip
//默认当前目录则为
unzip flutter_macos_v0.5.1-beta.zip // flutter_macos_v0.5.1-beta.zip 下载下来的版本,也就是你的名称
//然后执行
export PATH=`pwd`/flutter/bin:$PATH
//再执行
flutter doctor
Focus here, you'll run into a bunch of problems
Question 2
Android toolchain - develop for Android devices
Solution
- Installation android studio
After installing, then perform
flutter doctor
There are problems, then open android studio, installation sdk, the installation process may prompt pop
mac Unable to access Android SDK add-on list
Sometimes more than a few canceled installed on their own, so I do not know why. But the Internet was posted answers
https://www.jianshu.com/p/dcf5675c8a9e
- Go to the application, find the Android Studio, right click -> Show Package Contents -> Contents-> bin, locate the file idea.properties, use the Text tool to open
- Add idea.properties file at the end of a line: disable.android.first.run = true, and then save the file .
- After closing the Android Studio is restarted, you can enter the interface .
This time it went to a cup of tea, slowly install sdk ...
carried out
flutter doctor
Now the above problem has basically been resolved
Question 3
Follow the prompts in order to execute the command below
Question 4
solution:
- Install two plug-ins:
Flutter plugin: Support Flutter development workflow (run, debug, thermal overload, etc.).
Dart plug-in: Provides code analysis (for authentication when entering the code, the code completion etc.). - Start Android Studio.
Open the Plug-in Preferences (Preferences> Plugins).
Select Browse repositories ..., select Flutter plug-in and click install.
Reboot Android Studio plug-ins to take effect.
Question 5
This problem is solved very good, open the link in the figure, in accordance with the guidelines, to open the Visual Studio Code, if the application is not to install it, open the link prompts to install
Question 6
Compiler configuration problems arise, I am here with the visual studio code
Installation VS Code
- Code VS , install version 1.20.1 or later.
Flutter plug-in installation
- Start VS Code
- Call View> Command Palette ...
- Enter 'install', then choose Extensions: the Install the Extension Action
- In the search box, enter
flutter
, choose 'Flutter' in the search results list, and then click Install - Selecting 'OK' to restart the VS Code
By Flutter Doctor verify your settings
- Call View> Command Palette ...
- Enter 'doctor', select 'Flutter: Flutter Doctor the Run' Action
- See if "OUTPUT" output window of a problem
According to the same course, the problem arises
Solution:
Click Locate SDK, load your local installation flutter path can be solved.
Reproduced in: https: //www.jianshu.com/p/1a2ff038c70b