记录Flutter安装使用过程
1.下载flutter_macos_v1.0.0-stable.zip, 笔者使用mac book;跳转
2.在中国大陆使用Flutter 参考
- 运用sh文件进行配置
新建flutter_install.sh,内容如下:
export PUB_HOSTED_URL=https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cngit clone -b dev https://github.com/flutter/flutter.gitexport PATH="$PWD/flutter/bin:$PATH"cd ./flutterflutter doctor
在终端上运行:
sudo ./flutter_install.sh,如提示权限问题,请执行 chmod 777 flutter_install.sh 后再执行一次之前的command来执行doctor:
Woah! You appear to be trying to run flutter as root.
We strongly recommend running the flutter tool without superuser privileges.
/
?
╔════════════════════════════════════════════════════════════════════════════╗
║ 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. ║
╚════════════════════════════════════════════════════════════════════════════╝
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.6 17G5019, locale en)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.io/setup/#android-setup for detailed
instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME
to that location.
You may also want to add it to your PATH environment variable.
[✗] 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
✗ 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
✗ Brew can be used to install tools for iOS device development.
Download brew at https://brew.sh/.
[✓] Android Studio (version 3.2)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] IntelliJ IDEA Community Edition (version 2018.3.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[!] Connected device
! No devices available
! Doctor found issues in 4 categories.
再过一会,根据机器上的情况进行反馈:笔者的机器没有配置$ANDROID_HOME和Xcode,一共4个问题,我们以下进行解决
- 在Ubuntu上进行配置
1.启动Terminal终端工具;
2.执行:sudo gedit ~/.bashrc 打开并编辑,
如配置JAVA_HOME:
export JAVA_HOME=[your_path]/jdk/jdk1.8.0_201
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
配置flutter:
export PATH="$PATH:[your_path]/flutter/bin"
- 在 mac os x 上配置$ANDROID_HOME
1.启动Terminal终端工具;
2.输入cd ~/ 进入当前用户的home目录;
3. 创建:touch .bash_profile
4.打开并编辑:open .bash_profile,输入以下内容:
export ANDROID_HOME={你android sdk的路经}
export PATH=$PATH:$ANDROID_HOME/bin
5.关闭.bash_profile并执行命令:source ~/.bash_profile
6.
再运行 ./flutter doctor
[✓] Android Studio (version 3.2)
[!] IntelliJ IDEA Community Edition (version 2018.3.3)✗ Flutter plugin not installed; this adds Flutter specific functionality.✗ Dart plugin not installed; this adds Dart specific functionality.[✓] Connected device (2 available) 7.重启android studio; 现在android运行基本上配置好了。 笔者运行的demo project:
转载于:https://www.cnblogs.com/johnnyzhao/p/10424380.html
记录Flutter安装使用过程相关推荐
- flutter安装及过程中遇到的问题解决
首先附上一个学习文档 https://flutterchina.club/setup-windows/ 一.安装SDK,这里讲解的是windows(用linux的大佬多一点,应该不需要看我这一篇啦) ...
- 记录自己完美安装Archlinux过程
记录自己完美安装Archlinux过程 前言 准备 安装介质 磁盘准备 进入U盘的Linux系统 正式开始 1.联网 2.更新系统时间 3.分区与格式化 3.1 查看分区 3.2 进入选择的硬盘 3. ...
- linux存储库rep 61082,安装informatic过程中的错误
1.Check if the DISPLAY variable is set export DISPLAY=192.168.3.201:0.0 在注销用户并切换到oracle或者infa 用户,就可以 ...
- 安装及管理程序(yum搭建本地源,了解rmp命令,查询卸载软件包,编译安装的过程)
文章目录 安装及管理程序 前言 linux命令与应用程序的关系 典型应用程序的目录结构 常见的软件包封装类型 查询RPM软件包信息 rpm概述 RPM机制封装命令格式 查询RPM软件包信息 查询未安装 ...
- datax的工具配置oracle,完全小白级DataX安装配置过程详解
apt-get install openjdk-7-jdk Linux小白,创建和删除文件夹都现问度娘学会的小白,最近被勒令研究一下DataX,当时一脸蒙X,根本木有听过吖,但是领导吩咐了就得办吖,问 ...
- Flutter安装、配置、初体验 windows 版
作为一名合格的开发人员,我们应该积极地去拥抱新的事物,当然这个想法也不限于技术,加油! Flutter 了解一下 Flutter是谷歌的移动UI框架,可以快速在iOS和Android上构建高质量的原生 ...
- mldonkey 安装详细过程
http://bbs.54cto.com/archiver/tid-891.html mldonkey 安装详细过程 1. P2P 软件 推荐使用MLdonkey( http://mldonkey.b ...
- macM1下PD虚拟机中ubuntu安装git过程中apt-get update失败、E: 部分索引文件下载失败等问题
macM1下PD虚拟机中ubuntu安装git过程中apt-get update失败.E: 部分索引文件下载失败等问题 问题描述 怀疑1:更新所用的软件源的问题 怀疑2:多架构支持导致在更新源时链接不 ...
- 笔记本搞双系统-安装Ubuntu过程没有出现选择试用-安装、没有选择“安装类型”页面、安装类型页面为空等问题解决
问题:安装Ubuntu过程没有出现选择试用-安装.没有选择"安装类型"页面.安装类型页面为空等问题解决 前言:因学习需要装linux操作系统,但是作为萌新没有大佬直接带,只能自己摸 ...
最新文章
- 类成员函数指针的语法
- TFboys:使用Tensorflow搭建深层网络分类器
- HDFS修改副本数并生效
- redis为什么内存不宜过大
- (原创)一个简洁通用的调用DLL函数的帮助类
- 数据--第51课 - 二叉排序树
- php二分查找法实例
- linux与windows文件共享——samba
- java种子_MC速通各类种子(java版,更新至6.26)
- 小程序 - 判断元素是否在页面的显示区域内 wx.createIntersectionObserver
- Date DateFormat SimpleDateFormat Calendar Joda-Time
- python matlab 普朗克公式黑体光谱辐射出射度 绘图
- vue中给字段base 64加密
- 初识frameset
- (转载)Everynes NES Hardware Specifications
- electron exec 神坑
- open /run/flannel/subnet.env: no such file or directory
- 解决打开Android sdk manger D:\BaiduNetdiskDownload\开发工具\android' 不是内部或外部命令,也不是可运行的程序问题
- 计算机专业英语词汇表RSTUVW
- C语言高考试卷分析模板,试卷分析模板
热门文章
- C++ inheritance examples
- mac版MySQL初始密码修改
- 学习笔记之MOOC《计算机程序设计C++》第5周编程作业
- MySQL 高级查询
- 揭露数据不一致的利器 —— 实时核对系统
- 关于STM32 IAP升级之为什么APP执行要0x2FFE0000这个数值的原因(基于STM32F446RET6)
- 图像处理之基础---去污算法
- 利用微信公众号实现商品的展示和支付(2)
- 【ZFNet】Visualizing and Understanding Convolutional Networks (2013) 全文翻译
- 三维模型(X,Y,Z)坐标,UV坐标