Flutter 安装环境

Flutter

安装SDK

# 下载
git clone -b v1.0.0 https://github.com/flutter/flutter.git
# 定义 PATH 让 flutter cli 可以全局使用
export PATH=$PATH:`pwd`/flutter/bin

检查及安装 flutter 所需环境

运行完成后会提示缺少哪些组件,

bash
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.0.0, on Mac OS X 10.13.6 17G65, locale
zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
✗ libimobiledevice and ideviceinstaller are not installed. To install with
Brew, run:
brew update
brew install –HEAD usbmuxd
brew link usbmuxd
brew install –HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install with Brew:
brew install ios-deploy
! CocoaPods out of date (1.5.0 is recommended).
CocoaPods is used to retrieve the iOS platform side’s plugin code that
responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work
on iOS.
For more info, see https://flutter.io/platform-plugins
To upgrade:
brew upgrade cocoapods
pod setup
[✓] VS Code (version 1.30.0)
```