Flutter环境搭建以及快捷命令
Flutter环境搭建
配置环境变量
用户变量
FLUTTER_STORAGE_BASE_URL : https://storage.flutter-io.cn
PUB_HOSTED_URL : https://pub.flutter-io.cn
由于是在国内,所以需要配置一个可靠的镜像站点,也可以选择清华大学TUNA
FLUTTER_STORAGE_BASE_URL: https://mirrors.tuna.tsinghua.edu.cn/flutter
PUB_HOSTED_URL: https://mirrors.tuna.tsinghua.edu.cn/dart-pub
获取Flutter SDK
下载链接:https://flutter.dev/docs/development/tools/sdk/releases#windows
可以直接下载SDK然后解压,也可以从github下载,目前最新版v1.12.13+hotfix.7
在系统变量中编辑用户变量的Path条目,添加flutter SDK的bin目录
Path : D:\flutter\sdk\bin
运行 flutter doctor
1,安装Android Studio (为了安装Android SDK)
2,安装VS Code 和 Android Studio 的Dart,Flutter插件
3,(非必须)安装安卓模拟器Android Studio>Tools>AVD Manager
4,如果是真机调试,开启开发人员选项 和 USB调试。
5,安装java jdk,配置环境变量
终端运行flutter doctor,显示No issues found ,环境搭建ok。
创建flutter项目,获取pubspec.yaml中的依赖包,运行项目
flutter create 创建项目
flutter pub get 获取依赖
flutter run 运行项目
创建,查看,启动模拟器
flutter emulators --create --name 模拟器名称
flutter emulators 查看所有模拟器
flutter emulators --launch 模拟器名称
Android Studio > Tools > AVD Manager 手动删除或者创建模拟器
检查,更新flutter
flutter doctor 显示flutter相关状态
flutter upgrade 更新flutter
查看所有flutter命令
Manage your Flutter app development.
Common commands:
flutter create <output directory>
Create a new Flutter project in the specified directory.
flutter run [options]
Run your Flutter application on an attached device or in an emulator.
Usage: flutter <command> [arguments]
Global options:
-h, --help Print this usage information.
-v, --verbose Noisy logging, including all shell commands executed.
If used with --help, shows hidden options.
-d, --device-id Target device id or name (prefixes allowed).
--version Reports the version of this tool.
--suppress-analytics Suppress analytics reporting when this command runs.
--bug-report Captures a bug report file to submit to the Flutter team.
Contains local paths, device identifiers, and log snippets.
Available commands:
analyze Analyze the project's Dart code.
assemble Assemble and build flutter resources.
attach Attach to a running application.
bash-completion Output command line shell completion setup scripts.
build Flutter build commands.
channel List or switch flutter channels.
clean Delete the build/ and .dart_tool/ directories.
config Configure Flutter settings.
create Create a new Flutter project.
devices List all connected devices.
doctor Show information about the installed tooling.
drive Runs Flutter Driver tests for the current project.
emulators List, launch and create emulators.
format Format one or more dart files.
generate run code generators.
help Display help information for flutter.
install Install a Flutter app on an attached device.
logs Show log output for running Flutter apps.
make-host-app-editable Moves host apps from generated directories to non-generated directories so that they can be edited by
developers.
precache Populates the Flutter tool's cache of binary artifacts.
pub Commands for managing Flutter packages.
run Run your Flutter app on an attached device.
screenshot Take a screenshot from a connected device.
test Run Flutter unit tests for the current project.
upgrade Upgrade your copy of Flutter.
version List or switch flutter versions.
Run "flutter help <command>" for more information about a command.
Run "flutter help -v" for verbose help output, including less commonly used options.
Flutter环境搭建以及快捷命令的更多相关文章
- Mac最新Flutter环境搭建运行和对比理解声明式UI
前言 这段时间一直都在学习和写关于SwiftUI的东西,前面也总结了四篇文章来大体上说了下Demo中功能实现的一些细节,后面准备开始了解学习一下Flutter,争取在年前能再用Flutter写一份项目 ...
- Flutter环境搭建
本文介绍mac上搭建Flutter环境 1.Flutter官方提供中国地区镜像地址:https://github.com/flutter/flutter/wiki/Using-Flutter-in-C ...
- Eclipse环境配置与快捷命令
1.VS.Chrome.Eclipse调试命令对比: VS: F5: 继续运行 F10: 单步执行 F11: 进入函数内部 Shift + F11: 由函数内部返回调用处 Chrome: F8: 继续 ...
- CVE-2018-1111漏洞复现-环境搭建与dhcp命令注入
0×01 前言 2018年5月,在Red Hat Enterprise Linux多个版本的DHCP客户端软件包所包含的NetworkManager集成脚本中发现了命令注入漏洞(CVE-2018-11 ...
- flutter环境搭建及跑起来demo(多图慎入)
话不多说,直接上 [1]环境搭建 从git上面clone下来 git clone -b beta https://github.com/flutter/flutter.git 由于国内网络的问题,我就 ...
- Flutter环境搭建遇坑小结(一)
对flutter的了解与开发也有一段时间了,总的来说,搭建开发环境遇到的各种坑也是很多,尤其对于初次接触Android开发的人员来说 一.flutter运行提示Running Gradle task ...
- win7系统下flutter环境搭建+AndroidStudio编译插件
flutter学习网址:https://flutter-io.cn/ ----------------------------------------------------------------- ...
- Mac OS下Flutter环境搭建记录,VS Code开发
安装Flutter 获取FlutterSDK 终端cd进入SDK安装目录,比如 cd ~/FlutterSDK 由于在国内访问Flutter有时可能会受到限制,Flutter官方为中国开发者搭建了临时 ...
- Redis学习——环境搭建以及基础命令使用
0. 前言: 这篇文章旨在对redis环境的搭建以及对redis有个大概的认识. 一.redis搭建: 环境:ubuntu 14 软件包:redis-3.0.3.tar.gz 安装步骤: 1. 首先解 ...
随机推荐
- redis安装zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录
问题: zmalloc.h:50:31: 致命错误:jemalloc/jemalloc.h:没有那个文件或目录 解决方案:执行命令:make MALLOC=libc make MALLOC=libc
- 头次接触wamp服务器、xampp,初次单独使用tomcat部署
刚刚经过了近两天的接触wamp.xampp.tomcat的时光,真的爽 导师有个网站打不开了,就让我去弄,还有一个网站的后台密码忘了,让我帮忙找回来.我第一感觉就是第一个活不简单,第二个还不简单吗?打 ...
- MergeSort(归并排序)原理及C++代码实现
归并排序利用分治策略进行排序.原理如下 分解:分解待排的n个元素的序列成个具n/2个元素的两个子序列. 解决:使用归并排序递归地排序两个子序列. 合并:合并两个已排序的子序列以产生已排序的答案. 归并 ...
- 吴裕雄--天生自然 HADOOP大数据分布式处理:使用WinSCP连接本机与虚拟机
- C++头文件和std命名空间
C++ 是在C语言的基础上开发的,早期的 C++ 还不完善,不支持命名空间,没有自己的编译器,而是将 C++ 代码翻译成C代码,再通过C编译器完成编译.这个时候的 C++ 仍然在使用C语言的库,std ...
- 口语、听力:新概念英语2,lesson 45
新概念英语2,lesson 45 练习听力
- Anaconda 安装、TensorFlow 安装、pytorch 安装
问题 1 假设已经安装完Anaconda Navigator,按照 网址:https://www.zhihu.com/question/55577586 的教程操作,设置镜像源地址,安装. 问题 2: ...
- python代码覆盖率统计-coverage
coverage.py是一个用来统计python程序代码覆盖率的工具.它使用起来非常简单,并且支持最终生成界面友好的html报告.在最新版本中,还提供了分支覆盖的功能. 官方网站: http://ne ...
- Skipping MapperFactoryBean with name 'sysUserMapper' and 'com.buding.system.mapper.SysUserMapper' mapperInterface. Bean already defined with the same name!
前几天整体看了一下SpringBoot的简介,觉得看不如自己动手做,于是动手做一个简单的用户管理.启动的时候遇到了Skipping MapperFactoryBean with name 'sysUs ...
- algorithm-question
主键都相同,选择排序和插入排序谁快 选择排序:比较N*(N-1)/2,交换0:插入排序:比较N-1,交换0:插入排序更 大专栏 algorithm-question快 逆序数组,插入排序与选择排序 ...