Documentation
Requirements
The HotSwan plugin relies on runtime class swapping and the Kotlin compiler plugin for code transformation. These dependencies impose specific platform and tooling requirements. This page explains each requirement and why it is needed.
Android API 28+
The HotSwan plugin requires a minimum Android API level of 28 (Android 9.0 Pie). This is because the runtime hot reload API was introduced in API 28. This is how the HotSwan client library loads the hot reload agent into the ART virtual machine at runtime.
The Gradle plugin automatically sets the debug variant's minSdk to 28. Your release builds are not affected and can target any API level your project requires.
Both real physical devices and emulators are supported. See the device recommendations section below for details on choosing the best API level for development.
IDE compatibility
The HotSwan plugin supports IntelliJ IDEA 2024.3 or later and the following Android Studio versions:
- Android Studio Meerkat (2024.3)
- Android Studio Narwhal (2025.1)
- Android Studio Otter (2025.2)
- Android Studio Panda (2025.3, Preview)
The IDE plugin is built against the IntelliJ Platform SDK, which means it works with any JetBrains IDE built on that platform. The minimum build number is 243 (IntelliJ 2024.3). Older IDE versions may lack the APIs that the HotSwan plugin uses for file watching, tool window management, and Gradle integration.
Kotlin 2.3.0+
The HotSwan compiler plugin targets the Kotlin 2.3.0 compiler API. Kotlin compiler plugins are tightly coupled to the compiler version because they operate on the compiler's intermediate representation (IR). Internal IR data structures and APIs can change between Kotlin versions, so the compiler plugin must be built against a specific minimum version.
If your project uses an older Kotlin version, you will need to upgrade before using HotSwan.
Android Gradle Plugin 8.7.3+
The HotSwan plugin depends on specific Gradle task names and output directories that were stabilized in AGP 8.7.3. The plugin reads compiled output and class files from standard build intermediates directories. These paths vary across AGP versions, and the HotSwan plugin targets the layout used by 8.7.3 and later.
If your project uses an older AGP version, you may encounter build errors or missing file paths. Upgrading AGP is recommended for compatibility.
Debug builds only
The HotSwan plugin only works with debug builds. This is a fundamental requirement, not a configuration choice.
Hot reload agent attachment requires the app to be debuggable. Release builds set debuggable false in the manifest, which prevents hot reload agent loading. Even if you forced the agent to load, release builds apply code shrinking (R8) and optimization that would make runtime class swapping unreliable.
The Gradle plugin respects this by only adding the client library as a debugImplementation dependency and only applying compiler transformations to debug variants (when debugOnly = true, which is the default). Your release APK has zero overhead from HotSwan.
Device recommendations
The HotSwan plugin works on both real physical devices and emulators. There is no restriction on device manufacturer, chipset, or system image.
While the minimum supported API level is 28, running your debug builds on a device with API 30 or higher is recommended. API 30+ devices support a wider range of hot reloadable changes, including adding new functions, new enum values, new data class properties, and other structural additions. On API 28 and 29, these additions require a full rebuild instead.
This only applies to the device you run debug builds on. Your release APK and its minSdk are completely unaffected. Since you control which emulator or test device you use during development, choosing an API 30+ image gives you the best hot reload experience at no cost to your production configuration.
| Requirement | Minimum version |
|---|---|
| Android API | 28 (Pie) |
| IDE | IntelliJ IDEA 2024.3+ / Android Studio Meerkat+ |
| Kotlin | 2.3.0 |
| Android Gradle Plugin | 8.7.3 |
| Build type | Debug |
| Device | API 28+ (API 30+ recommended) |