火焰错误:无法以声音零安全运行

时间:2021-05-26 11:42:05

标签: flutter flame

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

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
...

1 个答案:

答案 0 :(得分:0)

您使用的是不支持空安全的旧版本 (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