Hey guys, Not sure if anyone could help me with t...
# compose-ios
e
Hey guys, Not sure if anyone could help me with the following: I am trying to build
gradle
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:
Copy code
'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:
Copy code
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:
Copy code
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`:
Copy code
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. 🙌
👍 1
m
Have you added
Copy code
export 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 Ruby
👍 1
e
Thanks @Magnus Lundberg! All now! How ever, when trying to build
gradle
I still get the following error...🤷🏻‍♂️ Any ideas?