版本解析失败。 Pubspec yaml,颤振

version solving failed. Pubspec yaml, flutter

因为anyline的每个版本都依赖于permission_handler^5.0.1+1,而motorgate依赖于permission_handler^8.3.0,所以anyline是被禁止的。 所以,因为 motorgate 依赖于 anyline ^24.0.0-dev.1,版本解决失败。 pub get failed (1; 所以,因为motorgate依赖anyline ^24.0.0-dev.1,版本解析失败。)

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  http: ^0.13.4
  json_annotation: ^4.3.0
  flutter_icons: ^1.1.0
  provider: ^6.0.1
  shared_preferences: ^2.0.8
  material_design_icons_flutter: 5.0.5955-rc.1
  start_jwt: ^0.2.0
  fluttertoast: ^8.0.8
  flutter_pw_validator: ^1.3.0
  cool_alert:
  rflutter_alert: ^2.0.4
  whatsapp_unilink: ^2.0.0
  url_launcher: ^6.0.15
  flutter_launch: ^0.3.0
  geolocator: ^7.7.1
  geocoding: ^2.0.1
  google_sign_in: ^5.2.1
  flutter_facebook_auth:
  flutter_animated_dialog: ^2.0.1
  flutter_barcode_scanner: ^2.0.0
  restart_app: ^1.1.0
  permission_handler: ^8.3.0
  anyline: ^24.0.0-dev.1

anyline 已过时且与您的其他软件包不兼容。您必须将 permission_handler 降级到版本 ^5.0.1+1 才能兼容,但这可能会导致其他问题。

我所要做的就是使用依赖覆盖。