Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin Multiplatform Shared Module Not Available in New Module Wizard

I am trying to add another shared module in my KMP project. I chose File > New > New Module...

File > New > New Module...

The wizard that appears doesn't show the Kotlin Multiplatform Shared Module template:

Kotlin Multiplatform Shared Module

I have the KMM plugin installed already:

KMP Plugin

And I am using Android Studio Iguana | 2023.2.1:

Android Studio Version

Is there something I am missing here?

like image 576
Abdalrahman Shatou Avatar asked Dec 21 '25 08:12

Abdalrahman Shatou


2 Answers

enter image description here

Generate KMP project from the official Kotlin tool - https://kmp.jetbrains.com/

like image 76
Fusion Developers Avatar answered Dec 23 '25 22:12

Fusion Developers


The missing option is a bug if you are on Android Studio Ladybug 2024.2.1 Patch 2+ and Kotlin Multiplatform Shared Module 0.8.3(242)-5.

Workarounds:

Downgrade the plugin version to (0.8.3(242)-4) from here.

or

  1. Manually create your module directory in the project folder
  2. Add a src directory under your new module folder
  3. Add a build.gradle(.kts) file under your new module folder
  4. "Register" your new module with an include(:my:new:module) in settings.gradle(.kts)

References:

Jetbrains plugin bug tracker - https://youtrack.jetbrains.com/issue/KT-72727/KMP-Shared-Module-option-is-missing-in-AS-Ladybug-2024.2.1-Patch-2

Google Android Studio bug tracker - https://issuetracker.google.com/issues/377287469

like image 40
GucaTEC Avatar answered Dec 23 '25 23:12

GucaTEC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!