flutter 问题收集

后续遇到问题会陆续更新 ...
1、Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

  • package:flutter_swiper
  • package:flutter_screenutil
  • package:flutter_page_indicator
  • package:transformer_page_view

For solutions, see https://dart.dev/go/unsound-null-safety

碰到这种问题,安卓和iOS项目都跑不起来,一般2种解决方案:
a、降低 flutter 使用的版本
b、Flutter IDE启动禁用sound null safety
Android Studiio(原生开发,即根目录为android)
flutter项目内的android 目录下gradle.properties 增加extra-front-end-options=--no-sound-null-safety
Xcode(原生开发,即根目录为ios)
在 Build Settings-》User-Defined. 添加 键EXTRA_FRONT_END_OPTIONS ,值 --no-sound-null-safety

你可能感兴趣的:(flutter 问题收集)