flutter sdk 版本升级到2.0或者更高的版本后,运行之前的代码会报错
Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:
- package:flutter_swiper
- package:flutter_page_indicator
- package:transformer_page_view
For solutions, see https://dart.dev/go/unsound-null-safety
FAILURE: Build failed with an exception.
这些包不支持 safety模式。我们可以在运行的时候添加–no-sound-null-safety。打开Android Studio,然后依次选择【Run】 -->【 Edit Configurations】 --> 【Add Additional Run args 】–> 【–no-sound-null-safety】,如下图。文章来源:https://www.toymoban.com/news/detail-686335.html
文章来源地址https://www.toymoban.com/news/detail-686335.html
到了这里,关于Flutter Cannot run with sound null safety, because the following dependencies的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!