https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
v

Victor Sandoval

01/18/2023, 8:27 AM
Hi everyone, apologies for the late message. I’m beginning to learn KMP and I am currently following this guide https://kotlinlang.org/docs/multiplatform-mobile-setup.html#possible-issues-and-solutions. I was able to install all the necessary tools and got the android simulator running for step 2. I have not been able to get the ios simulator to run. The error message reads
Copy code
Build iOS application failed with code: 65
Another issue I ran into, which I think is connected to the issue above, is that when i ran
Copy code
kdoctor
i was greeted with the following
Copy code
[✖] 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
I have attempted to fix this specific issue for the past few hours but have been unsuccessful. Any help would be really appreciated and apologies in advance if the solution is really simple.
k

Konstantin Tskhovrebov

01/18/2023, 8:35 AM
Could you show your 'kdoctor -v' output? Cc @Kathrin Petrova
v

Victor Sandoval

01/18/2023, 8:41 AM
Thank you for your quick reply! This is my output
Copy code
[✓] Operation System                                 
  ➤ Version OS: macOS 13.1
    CPU: Apple M1

[✓] Java
  ➤ Java (java version "1.8.0_351")
    Location: /Library/Java/JavaVirtualMachines/jdk1.8.0_351.jdk/Contents/Home/bin/java
  ➤ JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_351.jdk/Contents/Home

[✓] Android Studio
  ➤ Android Studio (AI-221.6008.13.2211.9477386)
    Location: /Applications/Android <http://Studio.app|Studio.app>
    Bundled Java: openjdk 11.0.15 2022-04-19
    Kotlin Plugin: 221-1.7.21-release-for-android-studio-AS5591.52
    Kotlin Multiplatform Mobile Plugin: 0.5.1(221)-61
  i Note that, by default, Android Studio uses bundled JDK for Gradle tasks execution.
    Gradle JDK can be configured in Android Studio Preferences under Build, Execution, Deployment -> Build Tools -> Gradle section

[✓] Xcode
  ➤ Xcode (14.2)
    Location: /Applications/Xcode.app
  i Xcode JAVA_HOME: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
    Xcode JAVA_HOME can be configured in Xcode -> Preferences -> Locations -> Custom Paths

[✖] Cocoapods
  ➤ ruby (ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22])
  ✖ 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
  ➤ ruby gems (3.0.3.1)
  ➤ cocoapods (1.11.3)
k

Konstantin Tskhovrebov

01/18/2023, 9:03 AM
It looks fine. Could you try to make new KMM application via Android Studio with all default settings?
You can setup Cocoapods later. For that, you have to install homebrew manager At the moment regular KMM app (without Cocoapods integration) should work fine on your machine
b

bo

02/23/2023, 4:41 AM
Was getting the same message and the accepted answer on this stackoverflow page solved the issue for me. The answer involves typing in a file path that uses the ruby version number which may be different on your machine (it was for me). For instance the stack overflow answer uses 3.0.0 but for me the path was 3.2.0. The command listed in the answer is comprised of two file paths that are separated by a colon. Go into finder and verify that each of the file paths are valid and if they are then go ahead and run the export command. Sometimes the folders referenced in the filepaths are hidden by Finder. To see hidden folders in Finder just click anywhere in the finder window and then type "CMD+SHIFT+." HTH!
48 Views