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.创建工程