flutter学习1:开发环境搭建

这篇博客介绍了Flutter的入门步骤,包括如何获取学习资源、安装Flutter SDK和Android SDK,以及设置环境变量。在安装过程中,特别指出了Android Studio和Android SDK的配置问题,并提供了手动指定路径的方法。此外,还演示了如何使用flutterdoctor检查环境,并创建新的Flutter工程。
摘要由CSDN通过智能技术生成

1.一些学习资料

flutter中文官网:https://flutter.cn/docs/get-started/install

flutter中文网:https://flutterchina.club/docs/

flutter实战电子书:https://book.flutterchina.club/

一些实战应用:https://github.com/Solido/awesome-flutter

2.安装flutter

先安装android,然后安装sdk。然后将flutter解压,将flutter\bin加放到环境变量中,在命令行运行下面的命令检查flutter环境是否安装好

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.18362.1256], locale zh-CN)
[!] Android toolchain - develop for Android devices
    X 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.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

    X No valid Android SDK platforms found in D:\Tool\platforms. Directory was empty.
[√] Chrome - develop for the web
[!] Android Studio (not installed)
[√] VS Code (version 1.55.0)
[√] Connected device (2 available)

! Doctor found issues in 2 categories.

第一个!表示没有找到sdk,第二个!表示没找到android-studio,手动指定一下安装位置,直到运行flutter doctor没有错误。

flutter config --android-sdk Android\Sdk
flutter config --android-studio-dir="Android\Android Studio"

3.创建工程

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值