android - 如何在 Android Studio 中升级 http 依赖
问题描述
颤振酒吧得到:
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”)如果需要,请删除。
解决方案
解决方案:我将依赖项(pubspec.yaml)中的http版本从旧版本更改为http:“^0.13.0”(最新截至2021年3月5日)(从pub.dev获取版本并输入http,go到安装选项卡,你会在那里找到版本)。
然后运行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
如果其他人想分享任何相关的东西,请做!谢谢你。
推荐阅读
- javascript - Safai/OSX 上的上下文菜单被打开它的点击关闭
- c# - 如何将`null`转换为可为空的int?我总是得到 0
- android - apksigner - 无效的密钥库格式
- javascript - jQuery Math - 没有空字段的计算
- cordova - 没有为模拟器指定目标 (CORDOVA)
- python - 总结文本文件的内容
- sendgrid - 当它们都是 sendgrid 时如何添加 2 个 DKIM 记录。Klaviyo 和 Sendgrid
- node.js - Mongoose - 如何通过 ObjectId 的“数组”查找?
- c# - 将二维数组分成偶数/奇数二维数组的程序问题(偶数/奇数数组中的额外零)
- amazon-web-services - 创建 AWS SNS 主题和 SQS 队列以及为主题订阅队列的推荐方法