首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >颤动库不兼容

颤动库不兼容
EN

Stack Overflow用户
提问于 2021-10-21 09:29:06
回答 2查看 37关注 0票数 0

我正在做一个flutter项目,我不是第一个开发它的人。在运行pub get之后,我遇到了大量的错误:

代码语言:javascript
运行
复制
Because xdg_directories >=0.1.2 <0.2.0-nullsafety.0 depends on process >=3.0.12 <5.0.0 and xdg_directories <0.1.2 depends on process ^3.0.12, xdg_directories <0.2.0-nullsafety.0 requires process >=3.0.12 <5.0.0.
(1) So, because path_provider_linux <0.2.0-nullsafety depends on xdg_directories ^0.1.0, path_provider_linux <0.2.0-nullsafety requires process >=3.0.12 <5.0.0.

    Because process >=4.0.0-nullsafety.1 <4.0.0-nullsafety.4 requires SDK version >=2.10.0-0.0 <2.12.0 and process >=4.0.0-nullsafety.4 <4.0.0 depends on platform ^3.0.0-nullsafety.4, process >=4.0.0-nullsafety.1 <4.0.0 requires platform ^3.0.0-nullsafety.4.
    And because process >=3.0.12 <4.0.0-nullsafety.1 depends on intl >=0.14.0 <0.17.0 and process >=4.0.0 depends on platform ^3.0.0, process >=3.0.12 requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0.
(2) So, because path_provider_linux <0.2.0-nullsafety requires process >=3.0.12 <5.0.0 (1), path_provider_linux <0.2.0-nullsafety requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0.

    Because shared_preferences_linux <=0.0.2 depends on path_provider ^1.6.11 and shared_preferences_linux >=0.0.4-nullsafety <2.0.0 depends on shared_preferences_platform_interface ^2.0.0-nullsafety, shared_preferences_linux <0.0.2+1 or >=0.0.4-nullsafety <2.0.0-∞ requires path_provider ^1.6.11 or shared_preferences_platform_interface ^2.0.0-nullsafety.
    And because shared_preferences_linux >=0.0.2+1 <0.0.4-nullsafety depends on path_provider_linux ^0.0.1 and path_provider >=1.6.10 <2.0.0-nullsafety depends on path_provider_linux ^0.0.1, shared_preferences_linux <2.0.0 requires shared_preferences_platform_interface ^2.0.0-nullsafety or path_provider_linux ^0.0.1.
    And because path_provider_linux <0.2.0-nullsafety requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0 (2), shared_preferences_linux <2.0.0 requires platform ^3.0.0-nullsafety.4 or intl >=0.14.0 <0.17.0 or shared_preferences_platform_interface ^2.0.0-nullsafety.
    And because every version of flutter_localizations from sdk depends on intl 0.17.0 and shared_preferences >=0.5.8 <2.0.0-nullsafety depends on shared_preferences_linux ^0.0.2, if flutter_localizations any from sdk and shared_preferences >=0.5.8 <2.0.0-nullsafety then platform ^3.0.0-nullsafety.4 or shared_preferences_platform_interface ^2.0.0-nullsafety.
    And because shared_preferences >=0.5.4+8 <2.0.0-nullsafety depends on shared_preferences_platform_interface ^1.0.0 and every version of localize_and_translate depends on flutter_localizations any from sdk, if shared_preferences >=0.5.8 <2.0.0-nullsafety and localize_and_translate any then platform ^3.0.0-nullsafety.4.
    And because localize_and_translate ^3.0.3 depends on shared_preferences ^0.5.12+4 and firebase_messaging >=0.2.0 <7.0.2 depends on platform ^2.0.0, localize_and_translate ^3.0.3 is incompatible with firebase_messaging >=0.2.0 <7.0.2.
    So, because educationtqnia depends on both firebase_messaging ^6.0.13 and localize_and_translate ^3.0.3, version solving failed.
pub get failed (1;     So, because educationtqnia depends on both firebase_messaging ^6.0.13 and localize_and_translate ^3.0.3, version solving failed.)
Process finished with exit code 1

这是我的pubspec-yaml文件:

代码语言:javascript
运行
复制
name: educationtqnia
description: education_tqnia

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+7

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter


  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  permission_handler: ^5.0.0+hotfix.4
  dio: ^3.0.8
  firebase_messaging: ^6.0.13
  flutter_local_notifications: ^1.1.3
  connectivity: ^0.4.8+2
  video_player: ^0.10.9+1
  image_picker: ^0.6.5+3
  cupertino_icons: ^0.1.3
  http: ^0.12.0+2
  flutter_launcher_icons: ^0.7.2+1
  flutter_rounded_date_picker: 0.3.0
  rflutter_alert: ^1.0.2
  intro_slider: ^2.2.9
  font_awesome_flutter: ^8.8.1
  shared_preferences: ^0.5.6+3
  fluttertoast: ^4.0.0
  percent_indicator: ^2.1.1+1
  responsive_builder: ^0.1.5
  chewie: ^0.9.10
  wc_flutter_share: ^0.2.0
  flutter_record: ^0.4.3+1
  cached_network_image: ^2.2.0
  gradient_text: ^1.0.2
  flutter_youtube: "^2.0.0"
  flutter_pdfview: ^1.0.3+2
  url_launcher: ^5.5.0
  webview_flutter: ^1.0.7
  full_screen_image: any
  

dev_dependencies:
  flutter_test:
    sdk: flutter
  localize_and_translate: ^3.0.3
  

flutter_icons:
  android: "launcher_icon" 
  ios: true
  image_path: "assets/icon/icon.png"

flutter_zoom_plugin:
      git:
        url: git://github.com/decodedhealth/flutter_zoom_plugin.git
        ref: 0.0.8

# 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:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  assets:
   - langs/ar.json
   - langs/en.json
   - assets/


  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
  - family: Cairo
    fonts:
    - asset: assets/fonts/Cairo-Black.ttf
    - asset: assets/fonts/Cairo-Bold.ttf
    - asset: assets/fonts/Cairo-ExtraLight.ttf
    - asset: assets/fonts/Cairo-Light.ttf
    - asset: assets/fonts/Cairo-Regular.ttf
    - asset: assets/fonts/Cairo-SemiBold.ttf
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

我试着降级flutter SDK,在不同的频道之间切换,并运行更改库的版本来解决这个问题,但都没有效果。有什么办法可以解决这个问题吗?谢谢。

EN

回答 2

Stack Overflow用户

发布于 2021-10-21 10:46:47

当Flutter或一些插件已经更新时,这个问题非常常见。我唯一能做的就是更新所有的东西,包括flutter和插件到他们的最新版本,如果一个因为没有维护而不兼容,试着把它换成另一个。

票数 0
EN

Stack Overflow用户

发布于 2021-10-21 10:49:35

添加到Miguels答案-如果需要在最新的flutter版本上可用,并与其他库兼容,您可以在相关库的GitHub页面上提交问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69659378

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档