Flutter Exception: build_runner >=1.7.2 which requires SDK version >=2.6.0-dev.8.0 <3.0.0 版本冲突解决

异常

Because state_manage depends on build_runner >=1.7.2 which requires SDK version >=2.6.0-dev.8.0 <3.0.0, version solving failed.
Flutter Exception: build_runner >=1.7.2 which requires SDK version >=2.6.0-dev.8.0 <3.0.0 版本冲突解决_第1张图片
异常.png

解决方法

  • 修改pubspec.yaml文件中的指定版本号为any,并依赖。
dev_dependencies:
  build_runner: any
  • 完成后在pubspec.lock文件中找到对应包的版本,并在pubspec.yaml中修改
dev_dependencies:
  build_runner: ^1.7.1
Flutter Exception: build_runner >=1.7.2 which requires SDK version >=2.6.0-dev.8.0 <3.0.0 版本冲突解决_第2张图片
pubspec.lock文件.png

你可能感兴趣的:(Flutter Exception: build_runner >=1.7.2 which requires SDK version >=2.6.0-dev.8.0 <3.0.0 版本冲突解决)