Enric
08/17/2023, 4:52 AMgradle
using the following compose-multiplatfor-ios-android
template on Android Studio
https://github.com/JetBrains/compose-multiplatform-ios-android-template/#readme
and I get the following error:
'pod install' command failed with code 1.
Error message:
Analyzing dependencies
Please, check that podfile contains following lines in header:
source '<https://cdn.cocoapods.org>'
Please, check that each target depended on shared contains following dependencies:
I am running on an M1 and got all the required software installed.
When running kdoctor
(after opening terminal) however, I see the following:
Environment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✖] Cocoapods
✖ System ruby is currently used
CocoaPods is not compatible with system ruby installation on Apple M1 computers.
Please install ruby via Homebrew, rvm, rbenv or other tool and make it default
Detailed information: <https://stackoverflow.com/questions/64901180/how-to-run-cocoapods-on-apple-silicon-m1/66556339#66556339>
✖ CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.zprofile
export LC_ALL=en_US.UTF-8
Conclusion:
✖ KDoctor has diagnosed one or more problems while checking your environment.
Please check the output for problem description and possible solutions.
I then tried to re-install cocoapods
following the stackoverflow
link, but without much luck, each time I restart the terminal keeps showing me the same as above.
But if I run:
export PATH=/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/3.0.0/bin:$PATH
I then see the following when running `kdoctor`:
Environment diagnose (to see all details, use -v option):
[✓] Operation System
[✓] Java
[✓] Android Studio
[✓] Xcode
[✖] Cocoapods
✖ CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.zprofile
export LC_ALL=en_US.UTF-8
Conclusion:
✖ KDoctor has diagnosed one or more problems while checking your environment.
Please check the output for problem description and possible solutions.
(the gradle
error is still the same here if I try to build gradle
again...)
has anyone had a similar issue?
PS: When I try to create a brand new Kotlin Multiplatform App
from scratch on Android studio, I don't have any gradle
build issues 🫤.
Thanks in advance.
🙌Magnus Lundberg
08/17/2023, 5:40 AMexport PATH="/opt/homebrew/opt/ruby/bin:$PATH"
to your .zprofile-file?
Since ruby is installed by default Homebrew does not automatically add it to your path to not clash with the system RubyEnric
08/22/2023, 7:47 AMgradle
I still get the following error...🤷🏻♂️
Any ideas?