1 Star 1 Fork 0

solocode/flutter_study

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

first_app

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Flutter 学习笔记

环境配置

一、flutter 中文网 https://flutterchina.club/setup-macos/ 获取SDK (github 或 flutter官网下载)

  • (1)解压 Flutter SDK 包

二、配置环境变量

    1. cd ~ 回到根目录 command+shift+. 检测根目录是是否有.bash_profile
    1. 若没有,终端下在根目录 vim .bash_profile 按i创建
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=/Users/9t2e20190814/Documents/development/flutter/bin:$PATH
  • /Users/9t2e20190814/Documents/development/flutter/改成你的开发目录
    1. esc+:wq+回车 保存
    1. 关闭所有窗口 终端根目录 echo $PATH
    1. 终端根目录 flutter help 或 flutter
    1. flutter doctor 检测 安装必装项
    1. open -a simulator // 打开xcode 中的simulator 模批器

三、安装android studio

  • 打开后 => custom => 注意一定勾选 android Virtual Device

四、安装android证书 桌面建文件夹flutter_app

    1. 终端打开 cd /Users/9t2e20190814/Desktop/flutter_app
    1. flutter create first_app 创建一个项目
    1. android studio 按顶部提示 install plugins
    1. flutter doctor --android-licenses 按步骤输入 y 签名证书
    1. android studio 按下标提示点 Configure plugins  我的Mac进到这一步就全部安装好了,因为我之前用open -a simulator已经启动了一个ios模拟器 需要android链接设备,到 6)
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
[✓] Android Studio (version 3.5)
[✓] Connected device (1 available)
  • 6) 链接设备 android studio-> Tools ->AVD Manager 默认设计直接 点击 绿色运行按钮就可以 链接设计,也可以跟根所需填加安装所需的设备模块

官方启动方式

$ cd first_app
$ flutter run
如果你同时开了两个设备 则运行
$ flutter run -d all'

vscode启动方式

$ cd first_app  
//工具栏-> 终端 -> 在不调试的情况下启动 -> 选择你要打开的模拟器

下面可以在lib下面开发你的项目了!

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Dart
1
https://gitee.com/solocoding/flutter_study.git
git@gitee.com:solocoding/flutter_study.git
solocoding
flutter_study
flutter_study
master

搜索帮助