3

I need to build an app for both iOS and Android.
I am getting this error after restarting Android Studio.

Kotlin Multiplatform Mobile plugin issue
Kotlin Multiplatform Mobile plugin is supposed to work on macOS only

I am using a windows machine.
Please tell me, if there is any solution to this problem.

Abhimanyu
  • 11,351
  • 7
  • 51
  • 121
Muath Nassar
  • 35
  • 1
  • 4

1 Answers1

11

KMM works in Windows.
There is an incorrect warning shown in Android Studio for the plugin stating "KMM Plugin is only available on macOS", which is probably the reason for the confusion.

Plugin Error

Note: Though KMM works in Windows Machine, there are limitations.

  • Using a Windows machine, you can only write Android and shared module code (Java & Kotlin).
  • Creating and running iOS simulators are NOT possible.

These are limitations from Apple rather than from KMM.
They are applicable for most of the cross-platform technologies like KMM, Flutter, etc.

Refer to this thread for more info.

Abhimanyu
  • 11,351
  • 7
  • 51
  • 121
  • 1
    Correct, trying it here and yes, you can write kotlin native code and use it on Windows or Linux systems, yet this message is misleading and should be changed as it discourages the use of KMM. – pinkfloyd Feb 10 '21 at 15:45
  • The issue I am facing is that I am not able to create a KMM project on windows. It gives me error : Project wasn't configured Command 'pod install' failed. Please (re)install CocoaPods and try again. So now how to I create the project. I understand that working on the iOS part wont be feasible but I'm trying to learn KMM and get to know the technology – Parth Anjaria Aug 13 '21 at 11:50
  • on windows you need to install cocopods separately with gem – Yidel Braver Jan 27 '22 at 03:06