欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

flutter安装学习记录

程序员文章站 2022-05-29 10:48:24
...

1.下载flutter 目前安装在/Users/xiaofeiniao/

1.进入安装目录 目前安装在 账户目录下
cd /Users/xiaofeiniao
2.下载flutter资源
git clone -b stable https://github.com/flutter/flutter.git

2.配置环境变量

1.编辑 .profile
 cd /Users/xiaofeiniao/
 vim .profile
2.添加flutter的环境配置
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
export PATH=/Users/xiaofeiniao/flutter/bin:$PATH

3.检测flutter的安装

1.查看安装
flutter doctor 
2.查看详细的安装情况
flutter doctor -v

遇见的问题:

flutter安装学习记录

问题1:✗ Flutter requires Android SDK 28 and the Android BuildTools 28.0.3
      To update using sdkmanager, run:
        "/Users/xiaofeiniao/Library/Android/sdk/tools/bin/sdkmanager" "platforms;android-28"
        "build-tools;28.0.3"
      or visit https://flutter.dev/setup/#android-setup for detailed instructions.

解决问题的方案: 按照指示,执行 "/Users/xiaofeiniao/Library/Android/sdk/tools/bin/sdkmanager" "platforms;android-28"
        "build-tools;28.0.3"

问题2:Android licenses not accept ,to resolve this,run flutter doctor --android-licenses

解决方案:

flutter安装学习记录

遇见选择Y /N 统统选择 Y

问题3: Android Studio (version 3.0)

Flutter plugin not installed;this adds Flutter specific functionality

解决方案: 在Android Studio 中安装flutter插件

flutter安装学习记录

问题4: VS Code (Version 1.39.2)

Flutter extension not installled 

解决方案: 在VS Code编辑工具中,安装flutter 插件

flutter安装学习记录

学习博客:

https://www.jianshu.com/p/d3f74494949f

https://www.jianshu.com/p/d8ba5ac131c9

https://www.jianshu.com/p/d8ba5ac131c9

https://app.yinxiang.com/fx/f17aa445-29cb-496f-a890-7e9ca4f481df