0

安装火焰之后,当我在颤振中运行我的应用程序时(颤振运行)。关于空安全性,我遇到了一个很长的错误:

Running Gradle task 'assembleDebug'...
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

 - package:flame
 - package:ordered_set
 - package:box2d_flame
 - package:audioplayers
 - package:path_provider
 - package:flutter_svg
 - package:path_provider_linux
 - package:path_provider_windows
 - package:path_provider_platform_interface
 - package:uuid
 - package:xdg_directories
 - package:plugin_platform_interface
 - package:crypto
 - package:convert
 - package:path_drawing
 - package:xml
 - package:path_parsing
 - package:petitparser
...
4

1 回答 1

1

您正在使用不支持 null 安全性的旧版本 (0.29.3),您必须使用 1.0.0 的较新版本候选版本之一。

dependencies:
  flame: ^1.0.0-releasecandidate.11

https://pub.dev/packages/flame/versions/1.0.0-releasecandidate.11/install

于 2021-05-26T11:48:34.230 回答