╔════════════════════════════════════════════════════════════════════════════╗ ║ Welcome to Flutter! - https://flutter.dev ║ ║ ║ ║ The Flutter tool anonymously reports feature usage statistics and crash ║ ║ reports to Google in order to help Google contribute improvements to ║ ║ Flutter over time. ║ ║ ║ ║ Read about data we send with crash reports: ║ ║ https://github.com/flutter/flutter/wiki/Flutter-CLI-crash-reporting ║ ║ ║ ║ See Google's privacy policy: ║ ║ https://www.google.com/intl/en/policies/privacy/ ║ ║ ║ ║ Use "flutter config --no-analytics" to disable analytics and crash ║ ║ reporting. ║ ╚════════════════════════════════════════════════════════════════════════════╝
使用 Flutter Doctor 检查依赖
使用Flutter doctor 命令检查开发环境所依赖的软件,库是否安装完整。运行
1
flutter doctor
在我的环境中,系统会提示:
1 2 3 4 5 6 7 8 9 10 11 12 13
Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.18362.356], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.1) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [√] Android Studio (version 3.5) [!] VS Code, 64-bit edition (version 1.37.1) X Flutter extension not installed; install from https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [!] Connected device ! No devices available
! Doctor found issues in 3 categories.
可以看到,flutter doctor 分别检测出了:1. Android SDK 的问题;2. VS Code 没有安装插件的问题; 3. 没有设备连接的问题。 并都提出了解决方法。接下来就是安装解决方法去解决。
运行 “flutter doctor –android-licenses”, 按照系统提示同意所有的协议。