首页 > Windows开发 > 详细

已解决 : Error: Cannot run with sound null safety, because the following dependencies

时间:2021-05-08 16:28:13      阅读:430      评论:0      收藏:0      [点我收藏+]

flutter sdk 版本升级到2.0或者更高的版本后就发现运行时会报错:

Error: Cannot run with sound null safety, because the following dependencies
don‘t support null safety:

 - package:loading_indicator_view
 - 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

  • run
    flutter run --no-sound-null-safety
  • build
    flutter build apk --no-sound-null-safety

这里还有更多方式

已解决 : Error: Cannot run with sound null safety, because the following dependencies

原文:https://www.cnblogs.com/nurmemet/p/14744526.html

(0)
(0)
   
举报
评论 一句话评论(0
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!