Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve an error: The sandbox is not in sync with the Podfile.lock

When I add new plugin in Flutter, I get this error in my runner xcode:

The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation

and I have already install CocoaPods and updated. I tried to run pod install and not fixed it help please

like image 761
Mebrouki Amine Avatar asked Aug 03 '20 09:08

Mebrouki Amine


2 Answers

In my case the issue was caused by a local android only plugin. I created a dummy podsec file for the plugin, then ran:

cd ios
flutter pub get
pod install
pod update

It seems like I need to do these steps after every xcode project clean now.

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.6 19G73, locale en-AU)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
[✓] Android Studio (version 4.0)
like image 185
Michael Ribbons Avatar answered Sep 20 '22 13:09

Michael Ribbons


In my case, i have cleaned the build and then updated the pod files , yet there were some warnings but those can be neglected:

> flutter clean
> flutter pub get
> cd ios
> pod update
like image 31
WhiteDevil Avatar answered Sep 17 '22 13:09

WhiteDevil