5

I got a blocker when trying to convert existing simple android app writing in kotlin to KMM.

Below is the following error.

Please initialize at least one Kotlin target in 'kmmsharedmodule (:kmmsharedmodule)'.
Read more https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets

Unresolved reference: iosSimulatorArm64

I read the documentation provided in the link but seems not a direct solution to what i wanted.

The process i took was just by adding KMM module through provided support in android stuido.

I've looked for others sources but i couldn't find any related problems

KSDev
  • 261
  • 1
  • 12
  • 1
    What kotlin plugin version do you use? Same problem popped out in my case after downgrading to `1.5.21`. Looks like `iosSimulatorArm64` target was introduced in version `1.3.30`. https://kotlinlang.org/docs/whatsnew1530.html#apple-silicon-support – tomwyr Sep 11 '21 at 09:17
  • Simply removing this target from `build.gradle` fixed it for me. – tomwyr Sep 11 '21 at 09:17

1 Answers1

4

Update your compose version to 1.0.3 then you can set Kotlin Compiler Version to 1.5.30 . Now iosSimulatorArm64 will work fine as it was introduced in version 1.5.30

abhi
  • 961
  • 9
  • 13