How quickly and effectively installed flutter document on mac
Others
2019-08-08 07:16:51
views: null
How to install flutter
installation steps
- Download the flutter of sdk
- Unzip the download is complete (after unzip the file into the folder directory application)
- Using the command line (opened with editor)
code ~/ .bash_profile
(Environment Configuration)
- Add a row after opening the file
export PATH = $PATH:/Applications/flutter/bin
- Then execute the command line
source ~/.bash_profile
- Run
flutter --help
Description occurs if flitter, indicating flutter has been successfully installed!
Download other configuration environment
- You can download an Apple Store
xcode
Software
- May
xcode
open Simulator
- Then in
vscode
the prompt input flutter doctor
you will be prompted to have a device available
- Editor can be used
vscode
or a android studio
(temporary use VSCode)
- In the
vscode
installation flutter
of the plug-in
- Open a command panel: The search
flutter
will prompt some of flutter-related commands
- You can use the command-line tool
flutter doctor
to detect the problem (to solve some of the problems)
Command line to create a project
flutter create app
Note (Project name can not only use horizontal lines underscore)
- Enter the created directory
- Use
vscode
Open Directory
- Use the command in the terminal
git init
initialization warehouse
- Do a Save and submit
git add .
git commit -m'初始化'
Create a flutter in the project in vscode
Control + shift + p
In search flutter
of aNew project
Running the Project
- Before running the project, can be used
flutter doctor
to detect the next project
- Use the command
flutter emulator
can list items that can be used in the simulator
- Find a simulator, and the complex its name: as
apple_ios_simulator
- Excuting an order
flutter emulator --launch apple_ios_simulator
- After opening the simulator, we can execute the application of a flutter, use the command
flutter run
- Of course, if the system provides multiple simulators, we can choose
flutter -d
- R may be used in thermal loading
- Ctrl + c interrupt the running!
How to install Android studio plug-in
- Open android studio, and then open the project folder
- You will be prompted to install the plug-in, follow the prompts to install (dependent)
- Installed, restart simulator (Android studio)
- After opening, configure the emulator (open tools -> AVD Manager)
- Selecting the type and model of the specific device simulation, the API specific selection, the Graphics: Hardware-GLES2.0 selected in (finish).
- Open the editor of the debugging function, the compiler is run, this time we will choose a device (we can choose to create good equipment)
Origin www.cnblogs.com/yaogengzhu/p/11318198.html