• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Android Studio error: "CocoaPods not installed or not in valid state."

tdkehoe

Lurker
Jan 28, 2022
1
2
Where does Android Studio expect to find CocoaPods? Could this be a path problem?

I have Bumblebee 2021.1.1.

I'm trying to test my app on my iPhone from Android Studio. The error I get is

Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

Exception: CocoaPods not installed or not in valid state.


I ran gem list and the list of installed pods include:

cocoapods (1.11.2)
cocoapods-core (1.11.2)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (1.5.1)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
cocoapods-try (1.2.0)

I ran

sudo gem uninstall cocoapods && sudo gem install cocoapods

I ran

flutter clean

I restarted Android Studio.

I ran File > Invalidate Caches… > Invalidate and Restart.

I ran

brew install cocoapods
brew link --overwrite cocoapods


I ran

cd ios
pod install


This threw this error:

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target `Runner` to `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` or include the `Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig` in your build configuration (`Flutter/Release.xcconfig`).

I tried to open my Android Studio project in Xcode and got this error:

Could not open file.

What should I do?
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones