当我尝试将我的应用程序构建到 Flutter Desktop 时,它会失败并显示以下消息:
Running "flutter pub get" in project...
Launching lib/main.dart on Linux in debug mode...
Exception: No Linux desktop project configured. See https://github.com/flutter/flutter/wiki/Desktop-shells#create to learn about adding Linux support to a project.
我的配置是:
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.20.0-3.0.pre.126, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 4.0)
[✓] Connected device (3 available)
• No issues found!