Issue
I am having a rather weird day. I get this error whenever I try to run my app on iOS simulator from Android Studio
WARNING: CocoaPods requires your terminal to be using UTF-8
encoding. Consider adding the following to ~/.profile:export LANG=en_US.UTF-8
At this point on Xcode, I begin to get the error
Error: "The sandbox is not in sync with the Podfile.lock…"
when I try to build on Xcode. However, I am able to build successfully on Xcode and run on my emulator after the following fixes
1. $pod deintegrate --verbose
2. $pod install --verbose
Going back to Android Studio, I get my initial error again and so I keep going in circles
flutter doctor Doctor summary (to see all details, run flutter doctor
-v): [✓] Flutter (Channel stable, 2.2.0, on macOS 11.2.3 20D91 darwin-x64, locale en-NG) [✓] Android toolchain – develop for Android
devices (Android SDK version 30.0.3) [✓] Xcode – develop for iOS and
macOS [✗] Chrome – develop for the web (Cannot find Chrome executable
at /Applications/Google
Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [!] Android Studio
✗ Unable to find bundled Java version. [✓] Android Studio (version 4.1) [✓] IntelliJ IDEA Community Edition (version 2021.2.1) [✓] Connected device (1 available)
Solution
just change your cocoapos version to 1.10.2 to solve your problem.
first uninstall your current version (whatever it is)
In my case, i downgraded from version 1.11.1
sudo gem uninstall cocoapods
Then just install the stable version (as of Nov 11, 2021)
sudo gem install cocoapods:1.10.2
and build your app again.
If still not working , delete the below from the build directory:
- Podfile
- Podfile.lock
- Pods (directory)
and build.
It fixed it for me, twice in the last few days.
Answered By – Yahalom Software
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0