【问题标题】:How to upgrade http dependency in Android Studio如何在 Android Studio 中升级 http 依赖
【发布时间】:2021-06-03 18:46:31
【问题描述】:

颤振酒吧获取:

Because firebase_auth >=1.0.0 depends on firebase_auth_web ^1.0.0 which depends on http_parser ^4.0.0, firebase_auth >=1.0.0 require
s http_parser ^4.0.0.
And because http 0.12.2 depends on http_parser >=0.0.1 <4.0.0 and no versions of http match >0.12.2 <0.13.0, firebase_auth >=1.0.0 i
s incompatible with http ^0.12.2.
So, because p1 depends on both http ^0.12.2 and firebase_auth ^1.0.0, version solving failed.
Running "flutter pub get" in p1...
pub get failed (1; So, because p1 depends on both http ^0.12.2 and firebase_auth ^1.0.0, version solving failed.)

我刚刚运行了颤振升级,所以我的颤振和飞镖包是最新的,并且通过 sdk 管理器(在工具中)我安装了 android 10 和 11 以及所需的 sdk 工具。 Android Studio 没有待处理的开发频道更新。 (2021 年 3 月 5 日) Firebase 版本是昨天才包含的。

dependencies:
  http: "^0.12.2"
  flutter:
    sdk: flutter


 
  cupertino_icons: ^1.0.0
  firebase_core: ^1.0.0
  firebase_auth: ^1.0.0
  firebase_database: ^6.1.0

如果我遗漏了什么,我深表歉意。

编辑:是的,我完全错过了。我只需要在 pub.get 中查找 http 然后更改版本。 (最新:http:“^0.13.0”)如果需要,请删除。

【问题讨论】:

  • 您能否将解决方案添加为答案(而不是将其编辑到问题中)以防其他人遇到类似问题?这更“符合”通常的 Stack Overflow 格式,让人们更容易快速找到他们需要的信息。
  • @EJoshuaS - 恢复 Monica 哦,我的错,谢谢,我现在就去做!

标签: android firebase flutter android-studio upgrade


【解决方案1】:

解决方案:我将依赖项(pubspec.yaml)中的http版本从旧版本更改为http:“^0.13.0”(2021年3月5日最新)(获取版本从 pub.dev 并输入 http,转到安装选项卡,您会在那里找到版本。

然后运行flutter pub get,或者任何适合你需要的东西。

我目前的依赖:

dependencies:
  http: "^0.13.0"
  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.0
  firebase_core: ^1.0.0
  firebase_auth: ^1.0.0
  firebase_database: ^6.1.0

如果其他人想分享任何相关内容,请这样做!谢谢。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-01-05
    • 1970-01-01
    • 2022-06-21
    • 1970-01-01
    • 2022-11-15
    • 1970-01-01
    • 2021-05-01
    相关资源
    最近更新 更多