简体   繁体   English

firebase_messaging >=7.0.3 <8.0.0-dev.7 是被禁止的。 Flutter

[英]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.0firebase_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.

相关问题 Flutter firebase_messaging - Flutter firebase_messaging flutter版本与位置和firebase_messaging冲突 - flutter version conflict with location and firebase_messaging Flutter [firebase_messaging] IOS 构建错误 - Flutter [firebase_messaging] IOS Build Error 将 firebase_messaging 插件添加到 Flutter 项目 - Add firebase_messaging Plugin to Flutter Project Flutter firebase_messaging:^6.0.13 失败并出现异常: - Flutter firebase_messaging: ^6.0.13 failing with exception: 在 Flutter 中使用 Firebase Messaging ^8.0.0-dev.8 收到通知时如何运行函数? - How to run a function when a notification is received with Firebase Messaging ^8.0.0-dev.8 in Flutter? Flutter 错误:错误:无法解析 'package:firebase_messaging/firebase_messaging.dart' 中的 package 'firebase_messaging' - Flutter Error: Error: Could not resolve the package 'firebase_messaging' in 'package:firebase_messaging/firebase_messaging.dart' Flutter FCM 推送通知未在 IOS 上接收到 firebase_messaging:^9.1.3 - Flutter FCM push notification not receiving on IOS with firebase_messaging: ^9.1.3 Flutter firebase_messaging android 应用程序崩溃 on.getToken() 调用 - Flutter firebase_messaging android app crash on .getToken() call Flutter with firebase_messaging - 如何在权限对话框中自定义消息? - Flutter with firebase_messaging - how to custom message on permission dialog?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM