Does anyone know how to select the KMP module? I t...
# multiplatform
i
Does anyone know how to select the KMP module? I thought there was a KMP module option when creating a new module, but I can't find it. I have enabled KMP IDE features. My Android Studio version is 2024.2.2 Ladybug.
t
You need to install the jetbrains plugin for KMP to build a multiplatform project. You can download it here https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform
👍 1
m
Hello Isaac - you can test out KMP Shared Module in Android Studio Canary https://developer.android.com/studio/preview - no need to activate the experimental features. Let me know if you have any questions!
👍 1
i
Hello Matt, I successfully got the KMP Shared Module from the latest Canary version. However, I couldn't add it because it requires the Kotlin Gradle plugin to be at least version 1.9.20. Currently, I am using Kotlin 2.0.21. Do I need to add or change something? I tested it with the KMP wizard—I downloaded it and tried to add the new module right after downloading, but it didn’t work due to the Kotlin Gradle version. How should I update the Kotlin Gradle plugin?
m
Sorry to hear this is not working for you Isaac. I was able to reproduce this error - download a new KMP project from kmp.jetbrains.com , attempt to add a KMP Shared Module, get an error that Kotlin Gradle Plugin version should be higher than or equal to 1.9.20 (which it is). We will have a fix for you next week. In the meantime, you can add this to a new Compose Project (e.g., File - New - New Project - Empty Activity). Apologies for this not working. Thanks for testing this out.
i
Thank you very much for the fix! 👍