Flutter:macOS环境下安装

2019-03-27  本文已影响0人  春暖花已开
说明
首次发布 2019年03月27日
最近更新 2019年06月15日
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.io                   ║
  ║                                                                            ║
  ║ The Flutter tool anonymously reports feature usage statistics and crash    ║
  ║ reports to Google in order to help Google contribute improvements to       ║
  ║ Flutter over time.                                                         ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://github.com/flutter/flutter/wiki/Flutter-CLI-crash-reporting        ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://www.google.com/intl/en/policies/privacy/                           ║
  ║                                                                            ║
  ║ Use "flutter config --no-analytics" to disable analytics and crash         ║
  ║ reporting.                                                                 ║
  ╚════════════════════════════════════════════════════════════════════════════╝

下面开始正题:

安装Flutter

创建和运行工程

flutter create my_app
cd my_app
flutter run

FAQ:

brew install --HEAD libimobiledevice -g
brew install ideviceinstaller -g
sudo chmod -R 777 /var/db/lockdown

拓展
配置AndroidStudio 的 adb:
打开~/.bash_profile,添加以下代码:

ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools

保存后,执行

source ~/.bash_profile
上一篇 下一篇

猜你喜欢

热点阅读