Flutter 启动运行的时候报错:
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:url_launcher
- package:url_launcher_platform_interface
- package:plugin_platform_interface
For solutions, see https://dart.dev/go/unsound-null-safety
Command PhaseScriptExecution failed with a nonzero exit code

解决方案:
可以直接在命令行中执行
flutter run --no-sound-null-safety
也可以到Android studio中去设置运行配置
首先打开Edit Configurations 页面

然后在Additional run args 这行键入一下命令
--no-sound-null-safety
如图所示

然后点击OK,再次重新运行就可以了
解决Flutter运行时sound null safety问题的步骤指南
4万+

被折叠的 条评论
为什么被折叠?



