由于“ flutter_app”取决于与任何版本都不匹配的fluttertoast 4.0.2,因此版本解析失败。 这是我的pubspec.yaml文件
environment:
sdk: ">=2.2.2 <3.0.0"
module:
androidX: true
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: 0.1.2
google_maps_flutter: 0.5.29
google_map_location_picker: 3.3.3
mvc_pattern: 6.1.3+2
global_configuration: 1.5.0
http: 0.12.2
html: 0.14.0+3
shared_preferences: 0.5.8
flutter_html: 1.0.2
flutter_svg: 0.18.0
location: 3.0.2
flutter_inappbrowser: 2.0.2
url_launcher: 5.5.0
firebase_messaging: 6.0.16
cached_network_image: 2.2.0+1
fluttertoast: 4.0.2
flutter_staggered_grid_view: 0.3.2
intl_utils: 1.6.3
dev_dependencies:
flutter_test:
sdk: flutter
我得到的错误是这个
Because markets depends on fluttertoast 4.0.2 which doesn't match any versions, version solving failed.
Running "flutter pub get" in flutter_application...
pub get failed (1; Because markets depends on fluttertoast 4.0.2 which doesn't match any versions, version solving failed.)
答案 0 :(得分:0)
fluttertoast的最新版本是7.0.2,
由于您的软件包对我来说似乎已经过时,请尝试flutter pub outdated
查看软件包的最新版本,并相应地更新pubspec.yaml。
评论此答案是否仍然存在。
答案 1 :(得分:0)
替换
fluttertoast: 4.0.2
与
fluttertoast: any