I tried to install Firebase Messaging to an old flutter project but I get this error message
Because firebase_messaging >=7.0.3 <8.0.0-dev.7 depends on firebase_core ^0.5.0+1 and firebase_admob >=0.9.1 <0.10.0-dev.1 depends on firebase_core ^0.4.2+1, firebase_messaging >=7.0.3 <8.0.0-dev.7 is incompatible with firebase_admob >=0.9.1 <0.10.0-dev.1. So, because AppName depends on both firebase_admob ^0.9.3+2 and firebase_messaging ^7.0.3, version solving failed.
pubspec.yaml file
cupertino_icons: ^0.1.3
sqflite: ^1.2.1
path_provider: ^1.6.5
flutter_local_notifications: ^1.2.1
firebase_auth: ^0.15.5+2
google_sign_in: ^4.1.4
network_to_file_image: ^2.2.8
shared_preferences: ^0.5.6+2
firebase_database: ^3.1.3
url_launcher: ^5.4.2
share: ^0.6.3+6
firebase_in_app_messaging: ^0.1.1+3
auto_direction: ^0.0.4+1
sliding_up_panel: ^1.0.0
draggable_scrollbar: ^0.0.4
firebase_admob: ^0.9.3+2
provider: ^4.3.2
pdf: ^1.10.0
printing: ^3.5.0
flutter_sms: ^2.0.0+1
timeline_tile: ^1.0.0
anyone know how to solve this issue?
try removing the version number after the colon ":" from the three sdks.
firebase_messaging: firebase_admob: firebase_core:
then run pub get again
The firebase_messaging and the firebase_admob package depend on different versions of the firebase_core package.
| package | required firebase_core version |
|---|---|
firebase_messaging |
^0.5.0+1 |
firebase_admob |
^0.4.2+1 |
You can't have both versions. You need to use versions of these two packages that require the same firebase_core version. The newest versions of these two packages require 0.7.0:
https://github.com/FirebaseExtended/flutterfire/blob/master/packages/firebase_messaging/firebase_messaging/pubspec.yaml https://github.com/FirebaseExtended/flutterfire/blob/master/packages/firebase_admob/pubspec.yaml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With