Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support(代
Posted GMCode
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support(代相关的知识,希望对你有一定的参考价值。
从Flutter 2开始,Flutter便在配置中默认启用了空安全,通过将空检查合并到类型系统中,可以在开发过程中捕获这些错误,从而防止再生产环境导致的崩溃。如果当前项目开启了空安全,而引入的三方插件没有适配的话运行回报如下错误。
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:provider
For solutions, see https://dart.dev/go/unsound-null-safety
Restarted application in 341ms.
这个时候可以看下引入的插件新版本是否支持了空安全,如果插件支持了空安全插件平台会为其打上空安全的标:
如果引入插件还没不支持空安全,则可在终端执行以下命令来运行软件
flutter run --no-sound-null-safety
以上是关于Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support(代的主要内容,如果未能解决你的问题,请参考以下文章
Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support
Flutter Error: Cannot run with sound null safety, because the following dependencies don‘t support(代
关于Flutter报Cannot run with sound null safety
Cannot run with sound null safety
Error running ‘go build myfir_go_project‘: Cannot run program
Error running ‘go build myfir_go_project‘: Cannot run program