Using Android Studio Apply Changes to Hot‑Swap Code and Resources Without Restarting
Learn how to use Android Studio Apply Changes to instantly update code and resources while debugging, with limits and verification steps.
18 Jul 2026, 03:09 UTC

Quick answer: use Apply Changes for instant UI or logic updates
When you edit a Kotlin method, a layout file, or a string resource while the app is running in debug mode, click the Apply Changes button (or press Ctrl+F10) to push the modification to the device without restarting the activity.
How it works – a minimal example
Open app/src/main/res/values/strings.xml and change the value of app_name from 'MyApp' to 'MyApp Test'. Save the file.
With the app deployed to a connected device via USB or Wi‑Fi, click the lightning‑bolt Apply Changes icon in the debugger toolbar.
Android Studio recompiles only the changed resources, packages the updated resources.arsc file, and sends it over ADB. The Android framework’s resource manager swaps the new string into the running process, so the title bar updates immediately.
Limits and common pitfalls
- Apply Changes works only for debug builds built with Android Gradle Plugin 4.1+ and Android Studio 4.1+. Release builds ignore the button.
- It cannot modify static initializers, method signatures, or add new public methods that are called from native code; attempting such a change shows a warning and falls back to a full restart.
- Changes that alter the view hierarchy (e.g., adding a new
Viewin XML) may still require a restart because the inflated layout needs to be re‑parsed. - If the module you edited is not part of the current run configuration (for example, a library module not included in the app’s launch target), the IDE will not push the update.
- Large resource batches can exceed ADB’s transfer buffer; in that case Apply Changes fails and you must fall back to Instant Run or a full rebuild.
Verifying the result
- Run the app in debug mode on a device.
- Make a small change (e.g., edit a string or a method body).
- Click Apply Changes.
- Observe the UI or log output change instantly without the activity being recreated.
- To confirm the process stayed alive, open
Logcatand check that the process ID does not change after the operation.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.