0
点赞
收藏
分享

微信扫一扫

flutter项目实战一:搭建项目环境

windows搭建

  • 安装git
  • 下载flutter sdk;注意下载解压路径不能有空格等特殊字符,尽量用英文;不要装在c盘,不然权限会很头疼。
仓库地址:https://github.com/flutter/flutter.git 
  • 添加环境变量
    • 1、在开始菜单的搜索功能键入「env」,然后选择 编辑系统环境变量。
    • 2、在 用户变量 一栏中,检查是否有 Path 这个条目:
      • 2.1、如果存在这个条目,以 ; 分隔已有的内容,加入 flutter\bin 目录的完整路径。
      • 2.2、如果不存在的话,在用户环境变量中创建一个新的 Path 变量,然后将 flutter\bin 所在的完整路径作为新变量的值。
  • 你需要重新打开已经打开的命令行提示符窗口,这样下次启动命令提示符时,才能访问到刚才修改的变量。
  • 运行flutter doctor
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19043.1645], locale zh-CN)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

如上结果表示成功,有 X 解决 X ,请注意科学上网。

  • AndroidStudio 等类型开发工具安装在此不再赘述。

mac linux 搭建请自行查找资料

举报

相关推荐

0 条评论