Kotlin logo


A concise multiplatform language developed by JetBrains


Kotlin Multiplatform Mobile Plugin for Android Studio 0.3.0 Released

The KMM Plugin for Android Studio 0.3.0 was recently released! It comes with lots of new features and improvements that simplify the creation of new KMM projects and improve the process of developing iOS applications based on Kotlin Multiplatform Mobile. The latest version of the plugin includes:

  • A new KMM Library wizard with the ability to distribute KMM modules to iOS projects as XCFramework
  • The ability to use KMM plugin wizards on non-Mac machines
  • A hierarchical project structure supported in the generated projects

Try the KMM Plugin for Android Studio

Read on to learn more about these and other features!

Create a new KMM Library in a few clicks

In addition to the KMM Project and KMM Module wizards, you can now use the plugin to create a KMM library. This wizard generates a project that includes only a KMM shared module without both native iOS and Android projects. It simplifies your developer routine when you already have existing iOS or Android projects and want to develop shared code separately and then distribute the result artifact to your native projects manually or by using a dependency management tool.

To connect your KMM module to an iOS project, there are three types of distribution available:

  • XCFramework: the KMM framework is built as an XCFramework
  • Cocoapods Dependency Manager: the KMM framework is built as a regular Apple framework with the CocoaPods spec file
  • Regular framework: the KMM framework is built as a regular Apple framework for the specified native target

These distribution options are available both in KMM Library and KMM Module wizards.

The new KMM Library and KMM Module project wizards support the new type of KMM library distribution, XCFramework.

Use KMM Plugin project wizards on any machine

It’s no secret that you often end up using various machines and operating systems in one project. For instance, maybe you start with Linux (because it’s what you’re used to) before switching to a Macbook once all of the non-iOS work is done. Or maybe you don’t need your app to run on iOS (yet), but you’re ready to get started with KMM, figure out the project structure, and test all your code on Android. No matter your plan of attack, you can now use the KMM plugin to create a new KMM project, module, or library, because the latest version supports wizards on any machine!

⚠️ You still won’t be able to run, test or debug your code on iOS, but all wizards will be available to you.

Use the hierarchical project structure in new KMM projects

Kotlin 1.6 comes with the hierarchical project structure enabled by default. The KMM plugin now generates projects that are properly configured to use the hierarchical project structure for all iOS targets, including M1. 

More improvements to easily develop KMM Apps

In addition to the main features, the new version of the plugin also brings a lot of other improvements that will make it easier for you to work with it on a day-to-day basis. Such enhancements include Kotlin/Native debugger type evaluation improvements and fixes for launching iOS devices with Xcode 13. For the complete change log, compatibility information, and to learn how to update, please visit the KMM Plugin Releases page.

As always, your feedback is highly appreciated! If you’re having any issues or would like to request a feature, please use our issue tracker, YouTrack

Try the KMM Plugin for Android Studio

Important information for authors of Kotlin Multiplatform libraries with Android targets: we recently discovered a couple of issues affecting the compatibility of libraries published in setups that use the most recent versions of Kotlin, Gradle, and the Android Gradle plugin.

We recommend that you continue using Kotlin 1.5.31 and AGP 7.0.X (or older), rather than upgrading either of them. Kotlin 1.5.32 and Kotlin 1.6.10 will arrive shortly with compatibility fixes.

Read more

image description