Kotlin Multiplatform Tutorial: Build “GuessWhat” for Android, iOS, and Desktop

Build once, run on Android, iOS, and Desktop with Compose Multiplatform

Let’s build something small but complete: GuessWhat. It’s a simple “guess the hidden combination” app, but the main focus is learning Kotlin Multiplatform and Compose Multiplatform — how to organize modules, share code, and run the same app on Android, iOS, and Desktop.

We’ll start from the official Kotlin Multiplatform project template (created either in Android Studio or via the JetBrains KMP Wizard) and then build it up step by step.

Let’s get started

  1. Open Android StudioFile → New → New Project.
  1. Select Kotlin MultiplatformNext
  1. Set:
    • Name: GuessWhat-KMP
    • Package name: me.mitkovic.guesswhat
    • for project location pick GuessWhat-KMP folder somewhere on your computer.
    • Next
  1. Make sure targets include Android, iOS, and Desktop (also Share UI).
    We will add tests later. Don’t include them now.
  2. Click Finish and let Gradle sync complete.
  3. In Android Studio in top left corner (on the right from the Project folder icon) pick Project from the drop down menu
    In Android Studio Terminal type: git init
    Enter
  1. In Android Studio top right corner, below Project icon, you will now see Commit tab:
  1. Select all files and type in the box below: Initial commit
    Click on Commit button.
    Let git do its work.
  2. Run:
    • Android: select the Android run configuration → Run
    • Desktop: run the desktop configuration (usually desktopMain / Run desktop)
    • iOS: open the iosApp project in Xcode (or run iOS if you have it configured)

Leave a Reply