同一个包 Flutter 的不同版本出错
Error with different versions of the same package Flutter
如何解决这个错误?
Because syncfusion_flutter_charts >=20.1.55 depends on syncfusion_flutter_core ^20.1.55 and syncfusion_flutter_pdfviewer 19.4.56-beta depends on syncfusion_flutter_core ^19.4.56, syncfusion_flutter_charts >=20.1.55 is incompatible with syncfusion_flutter_pdfviewer 19.4.56-beta.
And because no versions of syncfusion_flutter_pdfviewer match >19.4.56-beta <20.0.0, syncfusion_flutter_charts >=20.1.55 is incompatible with syncfusion_flutter_pdfviewer ^19.4.56-beta.
So, because admin_m32 depends on both syncfusion_flutter_pdfviewer ^19.4.56-beta and syncfusion_flutter_charts ^20.1.55, version solving failed.
pub get failed (1; So, because admin_m32 depends on both syncfusion_flutter_pdfviewer ^19.4.56-beta and syncfusion_flutter_charts ^20.1.55, version solving failed.)
如何为同一个包指定不同的版本?
最好的方法是将 syncfusion_flutter_pdfviewer
更新为 20.1.55-beta
,但如果您仍需要使用当前版本,则可以在 pubspec.yaml 文件中覆盖:
dependency_overrides:
syncfusion_flutter_core: ^20.1.55
如何解决这个错误?
Because syncfusion_flutter_charts >=20.1.55 depends on syncfusion_flutter_core ^20.1.55 and syncfusion_flutter_pdfviewer 19.4.56-beta depends on syncfusion_flutter_core ^19.4.56, syncfusion_flutter_charts >=20.1.55 is incompatible with syncfusion_flutter_pdfviewer 19.4.56-beta.
And because no versions of syncfusion_flutter_pdfviewer match >19.4.56-beta <20.0.0, syncfusion_flutter_charts >=20.1.55 is incompatible with syncfusion_flutter_pdfviewer ^19.4.56-beta.
So, because admin_m32 depends on both syncfusion_flutter_pdfviewer ^19.4.56-beta and syncfusion_flutter_charts ^20.1.55, version solving failed.
pub get failed (1; So, because admin_m32 depends on both syncfusion_flutter_pdfviewer ^19.4.56-beta and syncfusion_flutter_charts ^20.1.55, version solving failed.)
如何为同一个包指定不同的版本?
最好的方法是将 syncfusion_flutter_pdfviewer
更新为 20.1.55-beta
,但如果您仍需要使用当前版本,则可以在 pubspec.yaml 文件中覆盖:
dependency_overrides:
syncfusion_flutter_core: ^20.1.55