这是验证可用内容并正确设置环境的方法:
$ flutter config
....
....
Settings:
enable-macos-desktop: true (Unavailable)
$ flutter channel stable
$ flutter devices
No devices detected.
Run Code Online (Sandbox Code Playgroud)
现在,如果您将其更改为 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
Run Code Online (Sandbox Code Playgroud)
我发现了问题。要使某些设置起作用,您必须在特定的颤振通道上。我在 flutter 的开发频道上,因此配置不起作用。
我现在改为 flutter master 并且效果很好。
https://github.com/flutter/flutter/wiki/Flutter-build-release-channels
| 归档时间: |
|
| 查看次数: |
1073 次 |
| 最近记录: |