[英]firebase_messaging >=7.0.3 <8.0.0-dev.7 is forbidden. Flutter
I want to add firebase_messaging
package to my flutter app, but when I install it, an error appeared which is:我想将
firebase_messaging
package 添加到我的 flutter 应用程序中,但是当我安装它时,出现了一个错误:
Because firebase_messaging >=7.0.3 <8.0.0-dev.7 depends on firebase_core ^0.5.0+1 and elderly_app depends on firebase_core ^0.7.0, firebase_messaging >=7.0.3 <8.0.0-dev.7 is forbidden.
So, because elderly_app depends on firebase_messaging 7.0.3, version solving failed.
pub get failed (1; So, because elderly_app depends on firebase_messaging 7.0.3, version solving failed.)
I have tried to install two versions of firebase_messaging
, they are:我尝试安装两个版本的
firebase_messaging
,它们是:
firebase_messaging: ^9.0.0
and firebase_messaging: 7.0.3
and also the same error appeard. firebase_messaging: ^9.0.0
和firebase_messaging: 7.0.3
也出现了同样的错误。
These are my dependencies
in pubspec.yaml
:这些是我在
pubspec.yaml
中的dependencies
项:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
ff_navigation_bar: ^0.1.5
calendar_timeline: ^0.7.0
date_time_picker: "^1.1.1"
firebase_core: ^0.7.0
firebase_auth: ^0.20.0+1
cloud_firestore: ^0.16.0
modal_progress_hud: ^0.1.3
datetime_picker_formfield: ^1.0.0
adhan: ^1.1.14
image_picker: ^0.6.7+22
syncfusion_flutter_calendar: ^18.4.42
geolocator: ^6.2.1
fluttertoast: ^7.1.6
geocoder: ^0.2.1
some_calendar: ^1.2.6
flutter_calendar_week:
git:
url: https://github.com/mduccc/flutter_calendar_week
ref: 0.1.0
bubble: ^1.1.9+1
firebase_storage: ^7.0.0
charts_flutter: ^0.9.0
firebase_messaging: 7.0.3
try removing the version number and use it like this:尝试删除版本号并像这样使用它:
firebase_messaging:
You must update the core version, also keep all firebase products up to dated, use the following latest release or you will face a lot of problems:您必须更新核心版本,同时保持所有 firebase 产品为最新版本,使用以下最新版本,否则您将面临很多问题:
firebase_messaging: ^9.0.0
firebase_core: ^1.0.1
firebase_auth: ^1.0.1
cloud_firestore: ^1.0.1
you can get to know the updates on every package you use by running 'flutter pub outdated'您可以通过运行“flutter pub outdated”了解您使用的每个 package 的更新
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.