Reputation: 11752
I want to conveniently develop Desktop applications using Flutter & Android Studio. Currently Flutter Desktop Apps run only on the master
channel.
I'm able to flawlessly enable MacOS as a flutter device with export ENABLE_FLUTTER_DESKTOP=true
where my macos laptop shows as the following device:
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.14.5 18F132
I can launch the app directly on desktop with flutter run
Which Run/Debug configuration should I choose to automatically build & launch Flutter app from Android Studio?
Flutter ver. Channel master, v1.9.8-pre.108
EDIT: as @smorgan correctly suggested, just run:
flutter config --enable-macos-desktop
Remember that you also need to have macos build target in your app workspace:
Upvotes: 1
Views: 2251
Reputation: 21579
You should not use ENABLE_FLUTTER_DESKTOP
; any instructions referencing it are out of date. You should instead run flutter config --enable-macos-desktop
as described in the official documentation.
That approach will enable desktop support everywhere, including Android Studio, rather than just the current terminal. Once you do that, normal Flutter workflows in Android Studio will work for desktop.
Upvotes: 4