发表日期:2018-03 文章编辑:小灯 浏览次数:1565
git clone -b beta https://github.com/flutter/flutter.git 打开.bash_profile(一般在Mac的当前用户目录下),编辑添加
export PATH=[克隆项目的目录]/flutter/bin:$PATH cenghaihandeMacBook-Pro:~ catchzeng$ vim ~/.bash_profile [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* # added by Anaconda2 5.1.0 installer export PATH="/Users/catchzeng/anaconda2/bin:$PATH"export PATH=/Users/catchzeng/flutter/bin:$PATH 运行source刷新
source ~/.bash_profile 验证PATH是否包含了flutter
cenghaihandeMacBook-Pro:~ catchzeng$ echo $PATH /Users/catchzeng/flutter/bin:/Users/catchzeng/anaconda2/bin: $ brew install --HEAD libimobiledevice $ brew install ideviceinstaller ios-deploy cocoapods https://code.visualstudio.com
dart codecenghaihandeMacBook-Pro:~ catchzeng$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.13.3 17D102, locale en-CN) [✓] Android toolchain - develop for Android devices (Android SDK 25.0.2) [✓] iOS toolchain - develop for iOS devices (Xcode 9.2) [✓] Android Studio (version 3.0) [✓] VS Code (version 1.21.1) [✓] Connected devices (1 available)• No issues found!
命令行面板
新建项目
demo
设备连接
签名信息
Debug
DemomainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new Text( 'You have pushed the button this many times 测试:', ), new Text( '$_counter', style: Theme.of(context).textTheme.display1, ), ],
Demo