Flutter环境搭建

Stella981 等级 155 0 0
标签: httpsflutter

本文介绍mac上搭建Flutter环境

1、Flutter官方提供中国地区镜像地址:https://github.com/flutter/flutter/wiki/Using-Flutter-in-China

2、下载Flutter源码 (官方建议下载beta分支)

git clone -b beta https://github.com/flutter/flutter.git

3、环境配置

  进入home目录 cd ~ , open -e .bash_profile(没有``bash_profile文件,就创建一个touch .bash_profile``)

  export PUB_HOSTED_URL=https://pub.flutter-io.cn
  export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
  export PATH="/Users/MacBook/flutter/bin:$PATH"

  注:

    1、Run source $HOME/.bash_profile to refresh the current window.

    2、__其中/Users/MacBook/flutter/bin就是刚刚下载的Flutter的bin目录__

4、使用flutter doctor 命令进行安装

cd ./flutter
flutter doctor稍等片刻就会出现如下界面就会安装成功

Downloading Dart SDK from Flutter engine e3687f70c7ece72000b32ee1b3c02755ba5361ac...

% Total % Received % Xferd Average Speed   Time Time     Time Current

Dload Upload   Total   Spent Left Speed

100 87.9M 100 87.9M 0     0 4247k 0 0:00:21 0:00:21 --:--:-- 4945k

Building flutter tool...

╔════════════════════════════════════════════════════════════════════════════╗

║                 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 assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!

Downloading Material fonts... 0.6s

Downloading package sky_engine... 0.3s

Downloading common tools... 0.8s

Downloading darwin-x64 tools... 3.4s

Downloading android-arm-profile/darwin-x64 tools... 0.6s

Downloading android-arm-release/darwin-x64 tools... 0.7s

Downloading android-arm64-profile/darwin-x64 tools... 0.6s

Downloading android-arm64-release/darwin-x64 tools... 0.6s

Downloading android-x86 tools...                             1.9s

Downloading android-x64 tools...                             2.4s

Downloading android-arm tools...                             1.2s

Downloading android-arm-profile tools...                     0.9s

Downloading android-arm-release tools...                     0.7s

Downloading android-arm64 tools...                           1.1s

Downloading android-arm64-profile tools...                   1.0s

Downloading android-arm64-release tools...                   0.8s

Downloading ios tools...                                     4.3s

Downloading ios-profile tools...                             3.7s

Downloading ios-release tools...                             3.2s

Downloading Gradle Wrapper... 0.1s

Doctor summary (to see all details, run flutter doctor -v):

[✓] Flutter (Channel beta, v0.6.0, on Mac OS X 10.12.6 16G1510, locale zh-Hans-CN)

[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)

! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✗] iOS toolchain - develop for iOS devices

✗ Xcode installation is incomplete; a full installation is necessary for iOS development.

Download at: https://developer.apple.com/xcode/download/

Or install Xcode via the App Store.

Once installed, run:

sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

✗ Brew not installed; use this to install tools for iOS device development.

Download brew at https://brew.sh/.

[✓] Android Studio (version 3.0)

✗ Flutter plugin not installed; this adds Flutter specific functionality.

✗ Dart plugin not installed; this adds Dart specific functionality.

[!] Connected devices

! No devices available

! Doctor found issues in 3 categories.

5、安装androidsudio的Flutter插件

Flutter环境搭建

6、使用androidsudio建立Flutter项目

Flutter环境搭建

 到此Futtler环境就搭建好了,希望能够帮助到您!附上成功的效果图

Flutter环境搭建

收藏
评论区

相关推荐

带你全面了解 Flutter,它好在哪里?它的坑在哪里? 应该怎么学?
回顾了这段时间解答关于 Flutter 的各种问题后,我突然发现很多刚刚接触 Flutter 的萌新,对于 Flutter 都有着不同程度的误解,而每次重复的解释又十分浪费时间,最终我还是决定写篇文章来做个总结。 内容有点长,但是相信能帮你更好地去认识 Flutter 。 Flutter 的起源 Flutter 的诞生其实比较有意思,Flutter
【Flutter实战】初识Flutter
1.2 初识Flutter 1.2.1 Flutter简介Flutter 是 Google推出并开源的移动应用开发框架,主打跨平台、高保真、高性能。开发者可以通过 Dart语言开发 App,一套代码同时运行在 iOS 和 Android平台。 Flutter提供了丰富的组件、接口,开发者可以很快地为 Flutter添加 native扩展。同时 Flu
【Flutter 实战】安装Flutter
1.3 搭建Flutter开发环境工欲善其事必先利其器,本节首先会分别介绍一下在Windows和macOS下Flutter SDK的安装,然后再介绍一下配IDE和模拟器的使用。 1.3.1 安装Flutter由于Flutter会同时构建Android和IOS两个平台的发布包,所以Flutter同时依赖Android SDK和iOS SDK,在安装Fl
Flutter - 深入理解Flutter引擎启动
基于Flutter 1.5,从源码视角来深入剖析flutter引擎的启动流程,相关源码目录见文末附录一、Flutter引擎启动工作 1.1 Flutter启动概览Flutter作为一款跨平台的框架,可以运行在Android、iOS等平台,Android为例讲解如何从Android应用启动流程中衔接到Flutter框架,
字节跳动为什么选用Flutter:并非跨平台终极之选,但它可能是不一样的未来
2018 年 12 月 ,Google 宣布 Flutter 1.0 版本正式发布。截至目前, Flutter 在 Github 上已获得 88000+ 的关注和 11000+ 的 Fork ,其发展速度相当惊人,是今年移动端最火热的开发框架之一。Flutter 大火背后的原因是什么?为什么越来越多的企业和开发者会选择使用 Flutter?Flutter 会
10分钟读懂阿里巴巴高级专家在Flutter Live2018的分享
作者:闲鱼技术-宗心 12月4日,google flutter团队宣布第一个flutter正式版本发布。次日,Flutter Live Beijing 会议上,google flutter团队邀请了在这一技术方案中重要的合作伙伴闲鱼团队分享这半年以来的通过flutter产出的业务结果以及对应的技术挑战。 ![](https://oscimg.oschin
Flutter
在Flutter 加载网页?也是有WebView的哦,和Android一样 1.添加依赖 dependencies: flutter\_webview\_plugin: ^0.2.1+2 2.导入库 import 'import 'package:flutter\_webview\_plugin/flutter\_webview\_plug
Flutter InkWell
![flutter_week](https://dxong.oss-cn-hongkong.aliyuncs.com/feng_mian/flutter_week.jpg) Flutter Inkwell使用详解 =================== > 该文章属于【**Flutter每周一组件**】系列,其它组件可以查看该系列下的文章,该系列会不间断
Flutter Swiper制作轮播效果
![](https://oscimg.oschina.net/oscnet/71c82559e8c6c5a42d6e3420594398793d7.png) #### 1、引入flutter\_swiper插件 flutter最强大的siwiper, 多种布局方式,无限轮播,Android和IOS双端适配. Flutter\_swiper的GitHub
Flutter 性能优化系列之打造高性能 widget
> “ > > 本文是 Flutter 性能优化系列文章之一,记录了 Flutter 团队优化 Flutter Gallery 的实践。本文主要介绍了如何打造高性能的 widget。原文链接:https://medium.com/flutter/building-performant-flutter-widgets-3b2558aa08fa > > ”
Flutter如何引用第三方库并使用
Flutter如何引用第三方库并使用 ================== [https://www.jianshu.com/p/bbda7794345e](https://www.oschina.net/action/GoToLink?url=https%3A%2F%2Fwww.jianshu.com%2Fp%2Fbbda7794345e) [Flut
Flutter安装
安装前准备:Android Studio 、VS Code、Git 1\. 使用镜像 -------- 添加用户环境变量: FLUTTER\_STORAGE\_BASE\_URL = https://storage.flutter-io.cn PUB\_HOSTED\_URL=https://pub.flutter-io.cn 2.g
Flutter开发常用第三方插件汇总
Bilibili开源的视频播放组件,fijkplayr 是基于 ijkplayer 封装的 flutter 媒体播放器,开箱即用,无需编译 ijkplayer \[fijkplayer\](https://github.com/befovy/fijkplayer) 加载动画库 \[flutter\_spinkit\](https://githu
Flutter环境搭建
本文介绍mac上搭建Flutter环境 1、Flutter官方提供中国地区镜像地址:[https://github.com/flutter/flutter/wiki/Using-Flutter-in-China](https://www.oschina.net/action/GoToLink?url=https%3A%2F%2Fgithub.com%2Ff
Flutter集成百度语音识别(Android端)实战
今天和大家分享一下Flutter中集成百度语音识别Android端的过程,供大家进行参考。 既然是Flutter集成,那首先就要创建一个Flutter项目,这个就不仔细讲了,可以参考Flutter中文的[创建项目流程](https://www.oschina.net/action/GoToLink?url=https%3A%2F%2Fflutterchin