Skip to main content
Compose Hot Reload provides seamless integration with IntelliJ IDEA and Android Studio, allowing you to make UI changes and see them instantly without restarting your application.

Prerequisites

For the best IDE experience, ensure you have:
If you don’t have the Kotlin Multiplatform IDE plugin installed, you can manually create Gradle run configurations with hot reload tasks. See the CLI Usage guide for task details.

Running from the IDE

With the Kotlin Multiplatform plugin installed, you can launch your application with hot reload directly from your code.
1

Locate your main function

Open the file containing your application’s main function.
2

Click the run icon in the gutter

In the gutter (the left margin of the editor), you’ll see a run icon next to your main function.Click the Run icon and select Run ‘shared [jvm]’ with Compose Hot Reload.
The exact text may vary depending on your target name. For example, if your JVM target is named desktop, it will show Run ‘desktop’ with Compose Hot Reload.
3

Your application launches

Your application will start with hot reload enabled. You’ll see the Compose Hot Reload dev tools window appear alongside your application.

Triggering Reloads

Once your application is running with hot reload, you can apply your code changes in two ways:

Automatic on Save (Default)

By default, changes are reloaded automatically when you save your files:
  1. Make changes to your Compose code
  2. Save the file (Ctrl+S / Cmd+S)
  3. Your changes appear instantly in the running application

Manual Reload

You can also trigger reloads manually:
  • Click the Reload UI button in the floating dev tools window
  • Use the keyboard shortcut assigned in your IDE settings
Reload UI button in the floating dev tools window

IDE Settings

You can customize the hot reload trigger behavior in your IDE settings. Navigate to Settings | Tools | Compose Hot Reload to configure:
  • When reloads are triggered
  • Keyboard shortcuts for manual reload
  • Other hot reload behaviors

Run Configurations

The Kotlin Multiplatform plugin automatically creates run configurations for hot reload tasks. You can also create custom run configurations:
  1. Go to Run | Edit Configurations…
  2. Click + and select Gradle
  3. Configure the task:
    • Gradle project: Select your module
    • Tasks: Enter a hot reload task name (e.g., hotRunJvm)
    • Arguments: Add optional arguments like --autoReload

Available Task Options

You can pass these options to your run configurations:
OptionDescription
--mainClass <FQN>Specify the main class to run
--autoReload / --autoEnable automatic reload mode
--no-autoReload / --no-autoDisable automatic reload mode
See the Gradle Tasks reference for all available tasks.

Desktop-Only Projects

If you have a desktop-only Compose Multiplatform project (without other targets like Android), you currently cannot start the application via the gutter run button due to CMP-3123.As a workaround, use Gradle tasks from the CLI or create a Gradle run configuration as described above.

Troubleshooting

Run configuration not appearing

If you don’t see the “Run with Compose Hot Reload” option:
  1. Verify the Kotlin Multiplatform IDE plugin is installed
  2. Sync your Gradle project
  3. Ensure your project has a JVM target configured

Reload not working

If changes aren’t being applied:
  1. Check that your file is saved
  2. Verify the application is still running
  3. Look for errors in the dev tools console
  4. Try triggering a manual reload using the Reload UI button

Multiple applications running

The IDE plugin currently supports only one Compose Hot Reload connection at a time. If you’re running multiple Compose applications simultaneously, run only one in hot reload mode, or use the CLI for additional instances.

Build docs developers (and LLMs) love