0

我添加flutter_chess_board: ^0.9.4pubspec.yaml文件的依赖项部分。跑步flutter pub get时,我得到:

因为chess依赖flutter_chess_board ^0.9.4 依赖chess >=0.6.5 <1.0.0,所以需要chess >=0.6.5 <1.0.0。所以,因为chess是1.0.0+1,版本求解失败.pub get failed (1;所以,因为chess是1.0.0+1,版本求解失败。)

4

2 回答 2

1

pubspec.yaml你有两个有冲突的包:

flutter_chess_board: ^0.9.4
chess: 1.0.0+1

将版本号更改为any并让颤振选择这些没有冲突的包的版本:

flutter_chess_board: any
chess: any

然后运行flutter pub get并检查pubspec.lock文件并搜索这些包以找到它们没有冲突的版本。更新您的pubspec.yaml并替换any为您在pubspec.lock.

于 2020-11-11T09:44:08.897 回答
0

还请add this dependency in your pubspec.yaml file https://pub.dev/packages/chess

chess: ^0.6.5

然后再次运行flutter pub get

于 2020-11-11T09:45:36.090 回答