Flutter Desktop:在 MacOS Catalina 上找不到设备
Flutter Desktop: Cannot find device on MacOS Catalina
我想用 flutter config --enable-macos-desktop
激活,执行后该值设置为 true 但(不可用)。
问题是我在 flutter devices
中也看不到我的设备。所以我的问题是你知道为什么它不可用吗?是否可以为 macOS 编写当前的桌面应用程序?
我发现了问题。要使某些设置起作用,您必须在特定的 flutter 频道上。我在 flutter 的开发频道,因此配置无效。
我现在换了flutter master,效果不错
https://github.com/flutter/flutter/wiki/Flutter-build-release-channels
这是验证可用内容并正确设置环境的方法:
$ flutter channel stable
$ flutter devices
No devices detected.
现在如果你将它改为master
$ flutter channel master
$ flutter devices
Downloading Dart SDK from Flutter engine aaf9e79f1d29e128ad5d3beaad1bf4dd0074c470...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 221M 100 221M 0 0 27.2M 0 0:00:08 0:00:08 --:--:-- 27.7M
Building flutter tool...
Downloading package sky_engine... 0.5s
Downloading flutter_patched_sdk tools... 1.0s
Downloading flutter_patched_sdk_product tools... 0.8s
Downloading darwin-x64 tools... 1.6s
Downloading darwin-x64/font-subset tools... 0.6s
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter config
....
....
Settings:
enable-macos-desktop: true
这是验证可用内容并正确设置环境的方法:
$ flutter config
....
....
Settings:
enable-macos-desktop: true (Unavailable)
$ flutter channel stable
$ flutter devices
No devices detected.
现在如果你将它改为master
$ flutter channel master
$ flutter devices
Downloading Dart SDK from Flutter engine aaf9e79f1d29e128ad5d3beaad1bf4dd0074c470...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 221M 100 221M 0 0 27.2M 0 0:00:08 0:00:08 --:--:-- 27.7M
Building flutter tool...
Downloading package sky_engine... 0.5s
Downloading flutter_patched_sdk tools... 1.0s
Downloading flutter_patched_sdk_product tools... 0.8s
Downloading darwin-x64 tools... 1.6s
Downloading darwin-x64/font-subset tools... 0.6s
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter config
....
....
Settings:
enable-macos-desktop: true
我想用 flutter config --enable-macos-desktop
激活,执行后该值设置为 true 但(不可用)。
问题是我在 flutter devices
中也看不到我的设备。所以我的问题是你知道为什么它不可用吗?是否可以为 macOS 编写当前的桌面应用程序?
我发现了问题。要使某些设置起作用,您必须在特定的 flutter 频道上。我在 flutter 的开发频道,因此配置无效。
我现在换了flutter master,效果不错
https://github.com/flutter/flutter/wiki/Flutter-build-release-channels
这是验证可用内容并正确设置环境的方法:
$ flutter channel stable
$ flutter devices
No devices detected.
现在如果你将它改为master
$ flutter channel master
$ flutter devices
Downloading Dart SDK from Flutter engine aaf9e79f1d29e128ad5d3beaad1bf4dd0074c470...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 221M 100 221M 0 0 27.2M 0 0:00:08 0:00:08 --:--:-- 27.7M
Building flutter tool...
Downloading package sky_engine... 0.5s
Downloading flutter_patched_sdk tools... 1.0s
Downloading flutter_patched_sdk_product tools... 0.8s
Downloading darwin-x64 tools... 1.6s
Downloading darwin-x64/font-subset tools... 0.6s
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter config
....
....
Settings:
enable-macos-desktop: true
这是验证可用内容并正确设置环境的方法:
$ flutter config
....
....
Settings:
enable-macos-desktop: true (Unavailable)
$ flutter channel stable
$ flutter devices
No devices detected.
现在如果你将它改为master
$ flutter channel master
$ flutter devices
Downloading Dart SDK from Flutter engine aaf9e79f1d29e128ad5d3beaad1bf4dd0074c470...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 221M 100 221M 0 0 27.2M 0 0:00:08 0:00:08 --:--:-- 27.7M
Building flutter tool...
Downloading package sky_engine... 0.5s
Downloading flutter_patched_sdk tools... 1.0s
Downloading flutter_patched_sdk_product tools... 0.8s
Downloading darwin-x64 tools... 1.6s
Downloading darwin-x64/font-subset tools... 0.6s
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter devices
1 connected device:
macOS • macOS • darwin-x64 • Mac OS X 10.15.4 19E287
$ flutter config
....
....
Settings:
enable-macos-desktop: true