安装 flutter 包时获取包版本冲突
Getting package version conflicts while installing flutter packages
我正在尝试安装软件包 jitsi_meet:pubspec.yaml 中的 ^4.0.0,在我安装时,我在安装终止时遇到此错误
Because jitsi_meet >=4.0.0 depends on jitsi_meet_platform_interface ^2.0.0 which depends on plugin_platform_interface ^2.0.0, jitsi_meet >=4.0.0 requires plugin_platform_interface ^2.0.0.
And because firebase_storage_platform_interface 1.0.4 depends on plugin_platform_interface ^1.0.0 and no versions of firebase_storage_platform_interface match >1.0.4 <2.0.0, jitsi_meet >=4.0.0 is incompatible with firebase_storage_platform_interface ^1.0.4.
And because firebase_storage 7.0.0 depends on firebase_storage_platform_interface ^1.0.4 and no versions of firebase_storage match >7.0.0 <8.0.0, jitsi_meet >=4.0.0 is incompatible with firebase_storage ^7.0.0.
So, because edaffix depends on both firebase_storage ^7.0.0 and jitsi_meet ^4.0.0, version solving failed.
pub get failed (1; So, because edaffix depends on both firebase_storage ^7.0.0 and jitsi_meet ^4.0.0, version solving failed.)
exit code 1
我的 pubspec.yaml 文件是
version: 1.1.1+3
environment:
sdk: '>=2.6.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
firebase_core: '^0.7.0'
firebase_auth: '^0.20.1'
firebase_crashlytics: '^0.4.0+1'
cloud_firestore: '^0.16.0+1'
cloud_functions: '^0.9.0'
firebase_storage: '^7.0.0'
firebase_messaging: '^8.0.0-dev.15'
cached_network_image: ^2.0.0
timeago: ^2.0.26
shared_preferences: ^0.5.6+3
carousel_slider: ^1.4.1
video_player: ^0.10.11+1
chewie: ^0.9.10
image_cropper: ^1.2.3
image_picker: ^0.6.7+2
flutter_offline: '^0.3.0'
percent_indicator: '^2.1.5'
jitsi_meet: ^4.0.0
jiffy: ^3.0.1
intl: ^0.16.1
flutter_datetime_picker: ^1.3.8
timeline_tile: ^1.0.0
flutter_full_pdf_viewer: ^1.0.6
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
uses-material-design: true
我尝试安装 plugin_platform_interface: '^1.0.0
作为额外的依赖项,但没有成功。
请帮我解决这个问题。
您可以将 jitsi_meet
包降级到版本 ^2.1.0
,错误应该会消失。
我通过以下方式获得了版本号:
- 将
jitsi_meet
版本保留为空,如下所示:
jitsi_meet:
这使得 pub 获得了包的最佳兼容版本。
- 正在
pubspec.lock
文件中搜索 jitsi_meet
。在那里我看到了这个代码块:
jitsi_meet:
dependency: "direct main"
description:
name: jitsi_meet
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
这意味着 pub
将版本号解析为 2.1.0
- 在
pubspec.yaml
文件中指定版本号,如下所示:
jitsi_meet: ^2.1.0
我正在尝试安装软件包 jitsi_meet:pubspec.yaml 中的 ^4.0.0,在我安装时,我在安装终止时遇到此错误
Because jitsi_meet >=4.0.0 depends on jitsi_meet_platform_interface ^2.0.0 which depends on plugin_platform_interface ^2.0.0, jitsi_meet >=4.0.0 requires plugin_platform_interface ^2.0.0.
And because firebase_storage_platform_interface 1.0.4 depends on plugin_platform_interface ^1.0.0 and no versions of firebase_storage_platform_interface match >1.0.4 <2.0.0, jitsi_meet >=4.0.0 is incompatible with firebase_storage_platform_interface ^1.0.4.
And because firebase_storage 7.0.0 depends on firebase_storage_platform_interface ^1.0.4 and no versions of firebase_storage match >7.0.0 <8.0.0, jitsi_meet >=4.0.0 is incompatible with firebase_storage ^7.0.0.
So, because edaffix depends on both firebase_storage ^7.0.0 and jitsi_meet ^4.0.0, version solving failed.
pub get failed (1; So, because edaffix depends on both firebase_storage ^7.0.0 and jitsi_meet ^4.0.0, version solving failed.)
exit code 1
我的 pubspec.yaml 文件是
version: 1.1.1+3
environment:
sdk: '>=2.6.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
firebase_core: '^0.7.0'
firebase_auth: '^0.20.1'
firebase_crashlytics: '^0.4.0+1'
cloud_firestore: '^0.16.0+1'
cloud_functions: '^0.9.0'
firebase_storage: '^7.0.0'
firebase_messaging: '^8.0.0-dev.15'
cached_network_image: ^2.0.0
timeago: ^2.0.26
shared_preferences: ^0.5.6+3
carousel_slider: ^1.4.1
video_player: ^0.10.11+1
chewie: ^0.9.10
image_cropper: ^1.2.3
image_picker: ^0.6.7+2
flutter_offline: '^0.3.0'
percent_indicator: '^2.1.5'
jitsi_meet: ^4.0.0
jiffy: ^3.0.1
intl: ^0.16.1
flutter_datetime_picker: ^1.3.8
timeline_tile: ^1.0.0
flutter_full_pdf_viewer: ^1.0.6
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
uses-material-design: true
我尝试安装 plugin_platform_interface: '^1.0.0
作为额外的依赖项,但没有成功。
请帮我解决这个问题。
您可以将 jitsi_meet
包降级到版本 ^2.1.0
,错误应该会消失。
我通过以下方式获得了版本号:
- 将
jitsi_meet
版本保留为空,如下所示:
jitsi_meet:
这使得 pub 获得了包的最佳兼容版本。
- 正在
pubspec.lock
文件中搜索jitsi_meet
。在那里我看到了这个代码块:
jitsi_meet:
dependency: "direct main"
description:
name: jitsi_meet
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
这意味着 pub
将版本号解析为 2.1.0
- 在
pubspec.yaml
文件中指定版本号,如下所示:
jitsi_meet: ^2.1.0