Flutter - run/debug 直接来自 Android Studio [配置] 的桌面应用程序
Flutter - run/debug desktop app directly from Android Studio [configuration]
我想使用 Flutter & Android Studio[=40= 方便地开发 Desktop 应用程序].目前 Flutter 桌面应用程序 运行 仅在 master
频道上。
我可以使用 export ENABLE_FLUTTER_DESKTOP=true
将 MacOS 完美地启用为 flutter 设备,其中我的 macos 笔记本电脑显示为以下设备:
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.14.5 18F132
我可以直接在桌面上使用 flutter run
启动应用程序
我应该选择哪种 Run/Debug 配置 以从 Android Studio 自动构建和启动 Flutter 应用程序?
Flutter 版本。频道大师,v1.9.8-pre.108
编辑:正如@smorgan 正确建议的那样,运行:
flutter config --enable-macos-desktop
请记住,您还需要在您的应用程序工作区中拥有 macos 构建目标:
你不应该使用 ENABLE_FLUTTER_DESKTOP
;任何引用它的说明都已过时。您应该按照 in the official documentation.
中的描述 运行 flutter config --enable-macos-desktop
这种方法将使桌面支持无处不在,包括 Android Studio,而不仅仅是当前的终端。执行此操作后,Android Studio 中的正常 Flutter 工作流程将适用于桌面。
我想使用 Flutter & Android Studio[=40= 方便地开发 Desktop 应用程序].目前 Flutter 桌面应用程序 运行 仅在 master
频道上。
我可以使用 export ENABLE_FLUTTER_DESKTOP=true
将 MacOS 完美地启用为 flutter 设备,其中我的 macos 笔记本电脑显示为以下设备:
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.14.5 18F132
我可以直接在桌面上使用 flutter run
我应该选择哪种 Run/Debug 配置 以从 Android Studio 自动构建和启动 Flutter 应用程序?
Flutter 版本。频道大师,v1.9.8-pre.108
编辑:正如@smorgan 正确建议的那样,运行:
flutter config --enable-macos-desktop
你不应该使用 ENABLE_FLUTTER_DESKTOP
;任何引用它的说明都已过时。您应该按照 in the official documentation.
flutter config --enable-macos-desktop
这种方法将使桌面支持无处不在,包括 Android Studio,而不仅仅是当前的终端。执行此操作后,Android Studio 中的正常 Flutter 工作流程将适用于桌面。