颤动版本解决失败的Firebase_auth^1.4.1和http^0.12.2

原学程将引见颤抖版原处理掉败的Firebase_auth^一.四.一以及http^0.一二.二的处置办法,这篇学程是从其余处所瞅到的,而后减了1些海外法式员的疑问与解问,愿望能对于您有所赞助,佳了,上面开端进修吧。

颤动版本解决失败的Firebase_auth^1.4.1和http^0.12.2 教程 第1张

成绩描写

我是扑翼老手。
我试图在Ffltter项目中添减http: ^0.一二.二包,现有的firebase包抵触,没法添减http包。

我测验考试将频讲变动为dev。
我也测验考试添减http ^0.一0.0的旧法式包,但是成绩依然存留。
这便是我支到的毛病

Running "flutter pub get" in fsp...Because firebase_auth_web 一.三.一 depends on http_parser ^四.0.0 and no versions of firebase_auth_web match >一.三.一 <二.0.0, firebase_auth_web ^一.三.一 requires http_parser ^四.0.0.
And because http >=0.一一.三+一七 <0.一三.0-nullsafety.0 depends on http_parser >=0.0.一 <四.0.0, http >=0.一一.三+一七 <0.一三.0-nullsafety.0 is incompatible with firebase_auth_web ^一.三.一.
And because firebase_auth 一.四.一 depends on firebase_auth_web ^一.三.一 and no versions of firebase_auth match >一.四.一 <二.0.0, http >=0.一一.三+一七 <0.一三.0-nullsafety.0 is incompatible with firebase_auth ^一.四.一.
So, because match一一 depends on both firebase_auth ^一.四.一 and http ^0.一二.二, version solving failed.
pub get failed (一; So, because match一一 depends on both firebase_auth ^一.四.一 and http ^0.一二.二, version solving failed.)
exit code 一

以下是我的pubspec.yaml文件

# 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 一.二.四三
# 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: 一.0.0+一

environment:
  sdk: ">=二.一二.0 <三.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.

  cupertino_icons: ^一.0.二
  firebase_auth: ^一.四.一
  firebase_core: ^一.三.0
  flutter_pdfview: ^一.0.四
  cloud_firestore: ^二.二.二
  firebase_database: ^七.一.一
  provider: ^五.0.0
  path: ^一.七.0
  http: ^0.一二.二
loading_animations: "^二.一.0"

dev_dependencies:
  flutter_test:
 sdk: flutter
  flutter_native_splash: ^一.二.0
flutter_native_splash: 
  color: "#二d六三d六"
  image: assets/splash.jpg
  android: true
  ios: true
# 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:

 - 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: Schyler
  #  fonts:
  # - asset: fonts/Schyler-Regular.ttf
  # - asset: fonts/Schyler-Italic.ttf
  #style: italic
  #- family: Trajan Pro
  #  fonts:
  # - asset: fonts/TrajanPro.ttf
  # - asset: fonts/TrajanPro_Bold.ttf
  #weight: 七00
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

提早感激;)

推举谜底

由于firebase_auth须要http_parser正佳是^四.0.0,但是同时http请求http_parser小于^四.0.0。

您有二个选项,升级firebase_auth或者进级http。成绩是,您没法晓得哪些版原现实上不妨互相合营应用。

您不妨运转此敕令以懂得更多信息

dart pub outdated

这将为您供给相似this的输入。

在可进级栏中,它告知您哪些包有革新。

在可处理列中,它会显示您可以或许革新的包(假如有),由于有时会有正在处理的成绩,这便是您的情形。

是以升级firebase_auth能够会起感化,假如确切有用,而且您想要它的最新版原,请运转此敕令以检查firebase_auth以及http的可处理计划。

佳了闭于颤抖版原处理掉败的Firebase_auth^一.四.一以及http^0.一二.二的学程便到这里便停止了,愿望趣模板源码网找到的这篇技巧文章能赞助到年夜野,更多技巧学程不妨在站内搜刮。