Mark Frelih
12/12/2022, 3:33 PM'pod install' command failed with an exception:
Cannot run program "pod" (in directory "/Users/markfrelih/AndroidStudioProjects/app-sdk/iosApp"): error=2, No such file or directory
Full command: pod install
Possible reason: CocoaPods is not installed
Please check that CocoaPods v1.10 or above is installed.
To check CocoaPods version type 'pod --version' in the terminal
To install CocoaPods execute 'sudo gem install cocoapods'
I have searched this channel for similar issues, tried googling it but nothing helps. 🤷 I’ve tried:
• Different versions of ruby
• Installing cocoapods via brew instead of gem
• https://stackoverflow.com/questions/70869813/android-studio-bumblebee-pod-install-command-failed-with-an-exception-error-2/70968187#70968187
The thing is that navigating to iosApp
folder and running pod install
manually works as expected. This is the output:
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
What is also interesting that I was able to solve it sometimes by running ./gradlew podInstall
manually and then I was able to sync the project. The things is that I can’t figure out why this sometimes works and sometimes doesn’t (at this moment I can’t get it to work at all). 😅
kdoctor only complains about cocoapods-generate, which is not compatible with ruby 3.0.0+ and afaik is not even needed now. I had it working without cocoapods-generate before. I tried for example using ruby 2.7.6 + cocoapods-generate installed, so kdoctor was all green, but I still could not sync the project.
My environment:
• cocoapods - 1.11.3
• Ruby - 3.0.3
• Android Studio - Dolphin | 2021.3.1 Patch 1
• Xcode - 13.3
• M1 mac
• macOS Monterey - 12.2
Any help is greatly appreciated! 🙏a-dd
12/12/2022, 3:58 PMa-dd
12/12/2022, 4:00 PMprintln("PATH=${System.getenv("PATH")}")
to your root build.gradle.kts and then run any task or gradle syncMark Frelih
12/12/2022, 4:01 PMMark Frelih
12/12/2022, 4:01 PMa-dd
12/12/2022, 4:07 PMMark Frelih
12/12/2022, 4:10 PMa-dd
12/12/2022, 4:18 PM$SHELL
values differs in IDE and terminal?Mark Frelih
12/12/2022, 6:11 PMMark Frelih
12/13/2022, 4:20 PMpod
command. I am using bash and I was able to run pod
via it manually. 🤷 The issue is now resolved. Thanks again!