欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Flutter 报错收集

程序员文章站 2022-06-11 11:35:17
...

报错原因 flutter_test依赖meta 1.3.0 , json_annotation >=4.1.0 依赖meta ^1.4.0,

Because every version of flutter_test from sdk depends on meta 1.3.0
and json_annotation >=4.1.0 depends on meta ^1.4.0, 
flutter_test from sdk is incompatible with json_annotation >=4.1.0.

解决:

json_annotation >=4.1.0

改为:

json_annotation >=4.0.1

其实不仅仅是 json_annotation 会有冲突, json_serializable也有冲突

json_serializable: ^5.0.0

改成:

json_serializable: ^4.1.3

就好了

参考文章 :
https://minpro.net/conflicts-between-the-latest-versions-of-json_serializable-and-json_annotation