Set up an environment for KMM development

harsh shah
2 min readJul 29, 2021

What is KMM

The purpose of the Kotlin Multiplatform Mobile (KMM) technology is to unify the development of applications with common logic for Android and iOS platforms

KMM project consists of three components

  1. Android application
  2. Ios application
  3. Shared module — common logic for both android application and ios application. Also run android and ios framework.

Set up

Photo by Matt Seymour on Unsplash

Open android studio

Navigate to Preferences -> Plugins and search for Kotlin Multiplatform Mobile and install it.

Now Restart Android Studio

Creating KMM Project

In Android studio, File -> New -> New project -> Select KMM Application -> Click to next

Set up Name and Package Name and Project location -> click to next

Click finish and wait for downloading gradle dependencies.

Now project set up the finish

We can now see that the android and ios and shared folder.

Shared module contains the core application logic used in both target platforms: classes, functions, and so on. This is a module that compiles into an Android library and an iOS framework. It uses Gradle with the Kotlin Multiplatform plugin applied and has targets for Android and iOS.

Now we can successfully run our application on android and ios device

find more details

KMM sample app also available on Github

--

--

harsh shah

Mobile Developer (Android , flutter) - 5 Years , Worked on multiple domain like pharma , financial , Ecommerce , BLE .