Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When I run code in Flutter, I get this error. How can I fix it?

Tags:

flutter

dart

Error: The pod "Firebase/Messaging" required by the plugin "firebase_messaging" requires a higher minimum iOS deployment version than the plugin's reported minimum version. To build, remove the plugin "firebase_messaging", or contact the plugin's developers for assistance. Error running pod install Error launching application on iPhone 15 Pro Max.

I try flutter pub get and the errors in the code fix it

like image 410
Mashael Saud Avatar asked Sep 07 '25 19:09

Mashael Saud


2 Answers

  • Check if you have the package in dependencies on file pubspec.yaml "firebase_messaging", if you don't have run this command flutter pub add firebase_messaging

  • Try calling rm -rf Podfile.lock && pod install --repo-update

  • Then flutter pub get

if not fix the issue

  • Try flutter clean

  • Then flutter pub get

like image 200
Henrique Kronhardt Avatar answered Sep 09 '25 17:09

Henrique Kronhardt


Specific for Firebase/Messaging pod problem:

  1. Go to ios folder cd ios in your root flutter project

  2. Then update pod repo by pod repo update

  3. Update Firebase/Messaging by pod update Firebase/Messaging

  4. And try to flutter run again!

With this method, i didn't need to change my minimum deployment target.

like image 33
gopelkujo Avatar answered Sep 09 '25 17:09

gopelkujo