mdddj / dd_check_plugin

idea 检测dio请求插件
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

dd_check_plugin集成异常 #1

Open MeiChao opened 1 year ago

MeiChao commented 1 year ago

集成dd_check_plugin: ^3.0.5异常

_dd_checkplugin: ^2.2.1正常

Flutter 版本

Flutter version 3.7.8 Dart version 2.19.5

pubspec.yaml 版本

environment: sdk: '>=2.12.0 <3.0.0' flutter: ">=3.7.0 <4.0.0"

以下是异常日志

Running "flutter pub get" in leshare-emc-app... Resolving dependencies... Because dd_check_plugin >=3.0.2 depends on network_info_plus ^4.1.0 and leshare_emc depends on network_info_plus ^3.0.2, dd_check_plugin >=3.0.2 is forbidden. So, because leshare_emc depends on dd_check_plugin ^3.0.5, version solving failed. pub get failed command: "/Users/mei/developer/FlutterSDK/flutter3.7.8/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example" pub env: { "FLUTTER_ROOT": "/Users/mei/developer/FlutterSDK/flutter3.7.8/flutter", "PUB_ENVIRONMENT": "flutter_cli:get", "PUB_CACHE": "/Users/mei/.pub-cache", } exit code: 1

mdddj commented 1 year ago

升级一下network_info_plus: ^4.1.0 到最新版本试试

或者强制使用 4.1.0 版本

dependency_overrides:
  network_info_plus: ^4.1.0
MeiChao commented 1 year ago

Reference in

尝试升级到

dependency_overrides: network_info_plus: ^4.1.0

异常日志如下:

Running "flutter pub get" in leshare-emc-app... Resolving dependencies... Because no versions of flutter_xupdate match >2.0.4 <3.0.0 and flutter_xupdate 2.0.4 depends on package_info_plus ^1.3.0, flutter_xupdate ^2.0.4 requires package_info_plus ^1.3.0. And because package_info_plus >=1.2.1 <1.4.1 depends on package_info_plus_windows ^1.0.4 and package_info_plus ^1.4.3 depends on package_info_plus_windows ^2.0.0, flutter_xupdate ^2.0.4 requires package_info_plus_windows ^1.0.4 or ^2.0.0 or package_info_plus >=1.4.1 <1.4.3. (1) So, because package_info_plus >=1.4.1 <1.4.3 depends on package_info_plus_windows ^1.0.5 which depends on win32 ^2.0.0, flutter_xupdate ^2.0.4 requires win32 ^2.0.0 or package_info_plus_windows ^2.0.0.

Because no versions of package_info_plus_windows match >2.1.0 <3.0.0 and package_info_plus_windows >=2.0.0 <2.1.0 depends on win32 ^2.7.0, package_info_plus_windows >=2.0.0 <2.1.0-∞ or >2.1.0 <3.0.0 requires win32 ^2.7.0.
And because package_info_plus_windows 2.1.0 depends on win32 >=2.7.0 <4.0.0, package_info_plus_windows ^2.0.0 requires win32 >=2.7.0 <4.0.0.
And because flutter_xupdate ^2.0.4 requires win32 ^2.0.0 or package_info_plus_windows ^2.0.0 (1), flutter_xupdate ^2.0.4 requires win32 >=2.0.0 <4.0.0.
And because network_info_plus >=4.0.1 depends on win32 >=4.0.0 <6.0.0, flutter_xupdate ^2.0.4 is incompatible with network_info_plus >=4.0.1.
So, because leshare_emc depends on both network_info_plus ^4.1.0 and flutter_xupdate ^2.0.4, version solving failed.

pub get failed command: "/Users/mei/developer/FlutterSDK/flutter3.7.8/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example" pub env: { "FLUTTER_ROOT": "/Users/mei/developer/FlutterSDK/flutter3.7.8/flutter", "PUB_ENVIRONMENT": "flutter_cli:get", "PUB_CACHE": "/Users/mei/.pub-cache", } exit code: 1

Process finished with exit code 1

只能升级到3.0.5

dependency_overrides: network_info_plus: ^3.0.5 dd_check_plugin: ^3.0.5

异常日志如下:

Running "flutter pub get" in leshare-emc-app... Resolving dependencies... Because dd_check_plugin >=3.0.2 depends on network_info_plus ^4.1.0 and leshare_emc depends on network_info_plus ^3.0.5, dd_check_plugin >=3.0.2 is forbidden. So, because leshare_emc depends on dd_check_plugin ^3.0.5, version solving failed. pub get failed command: "/Users/mei/developer/FlutterSDK/flutter3.7.8/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --directory . get --example" pub env: { "FLUTTER_ROOT": "/Users/mei/developer/FlutterSDK/flutter3.7.8/flutter", "PUB_ENVIRONMENT": "flutter_cli:get", "PUB_CACHE": "/Users/mei/.pub-cache", } exit code: 1

Process finished with exit code 1