KMP Development Environment Setup
Walks iOS developers through installing JDK, IDE, and Android emulator to run a KMP project on macOS.
What this file does
Walks iOS developers through installing JDK, IDE, and Android emulator to run a KMP project on macOS.
When to use it
- Setting up a KMP project from scratch on macOS
- You are an iOS developer unfamiliar with Android tooling
- Verifying your environment with KDoctor before opening a KMP project
Assumes this stack
KMP Development Environment Setup
Not assuming anything if you're an iOS developer. You may not have the Android/JVM setup necessary to run everything.
Install JDK
You'll need a JDK (Java Development Kit), preferably version 8. We recommend Amazon Corretto. Download the pkg installer and go through the setup instructions.
Some alternative options, if desired:
- SDKMan - JDK version manager and installer.
- AdoptOpenJDK - Alternate JDK distribution.
Install the IDE(s)
You'll also need either Android Studio, IntelliJ, or both. Android Studio is an Android development focused skin of IntelliJ, which is more platform agnostic. There is a built-in KMM plugin in the Android Studio, which enables you to run and debug the iOS part of your application on iOS targets straight from Android Studio. IntelliJ IDEA has a newer Kotlin API platform and gets bugfixes sooner, but it has an older version of Android plugin. If you don't have either, we recommend installing both through the Jetbrains Toolbox.
If you just want one or the other, you can use the following links:
- Android Studio docs installation guide (includes download link)
- IntelliJ download link (select the Community version)
- IntelliJ setup guide
You can use KDoctor to help you set-up your environment for Kotlin Multiplatform Mobile app development. It ensures that all required components are properly installed and ready for use. If something is missed or not configured KDoctor highlights the problem and suggests how to fix the problem.
Open IDE
Once you have your IDE installed, open it. If it's Android Studio, select Open an Existing Android Studio Project and if it's IntelliJ select Import Project. In the finder that opens up, select the root directory of your clone of this repository.
Opening this project in Android Studio should automatically configure the project's local.properties file. If for some reason it doesn't, or if you open the project in IntelliJ, you'll need to configure this file manually. To do so, open local.properties, and set the value of sdk.dir to /Users/[YOUR_USERNAME]/Library/Android/sdk.
On the left, above the project structure (or the Project Navigator in Xcode-ese), there's a dropdown menu above your project's root directory. Make sure that it's set to "Project" (for context: the IDE may think that you're working on a traditional Android project and set this menu to "Android" or make some similar mistake, and organize the files in the navigator accordingly).
Install an Android Emulator
The Android corollary to a Simulator is an Emulator. To install an Emulator, you need to open the Android Virtual Device (AVD) Manager, which is the corollary to the Device and Simulators window in Xcode.
If you're in Android Studio, go to Tools -> AVD Manager. If you're in IntelliJ, there's one extra step: go to Tools -> Android -> AVD Manager. After this first step, the process is the same in Android Studio and IntelliJ. Select + Create New Virtual Device....
You'll have a large choice of devices to choose from, but we recommend you install the newest, largest Pixel device to emulate (Pixel 3 XL at the time this is being written). Go to the next step and select the newest API level, and then go to the last step and select Finish.
Next Steps
Your KMP development environment is ready now. Your next step should be to go to the APP_BUILD.md doc, which focuses on building this project, as well as running it on both Android and iOS.
What's inside
5 sections: JDK install, IDE install, open IDE, install emulator, next steps.
Change this for your project
- Replace
[YOUR_USERNAME]insdk.dirpath with your macOS username - Replace
touchlab/kmm-pro-header-size-exercisewith your own repository name
Where it goes
A standard operating procedure. Keep where the team or agent running the process will find it.
Worth borrowing
- Recommending KDoctor to diagnose missing environment components
- Advising iOS developers to install both Android Studio and IntelliJ for different plugin strengths
Related Documents
Comprehensive AI Assistant Tools Reference
Lists 80+ tools with MCP server associations, bulk support, parallel capability, resource impact, and execution type for AI agent workflows.
iOS Deployment Guide
Walks through setting up an iOS development environment, building a Tauri app for iOS, and publishing to the App Store or alternative channels.
How to Add Resources to Your FastMCP Server
Teaches how to add static and dynamic MCP resources to a FastMCP server, with six ready-to-copy examples for a GitHub crawler.
Continue.dev MCP Integration Setup Guide
Walks through configuring Continue.dev to connect an MCP server for spatial transcriptomics tasks, with local and remote setup options.