我的pubspec.yaml文件
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
custom_info_window: ^1.0.1
custom_marker_icon: ^0.2.0
google_maps_flutter: ^1.1.1跑时
dart pub upgrade --major-versions错误:
因为每个版本的custom_marker_icon都依赖于google_maps_flutter ^1.1.1,而custom_info_window >=1.0.0依赖于google_maps_flutter ^2.0.2,所以custom_marker_icon与custom_info_window >=1.0.0不兼容。因此,由于flutter_appgooglemap同时依赖于custom_info_window >=1.0.1和custom_marker_icon >=0.2.0,所以版本解决失败了。
发布于 2021-09-21 11:21:16
对pubspec.yaml文件进行以下更改
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
custom_marker_icon: ^0.2.0
custom_info_window: ^1.0.1
dependency_overrides:
google_maps_flutter: ^1.1.1https://stackoverflow.com/questions/69267636
复制相似问题