Instant Run in Android Studio

Previously we discussed, How to Run Android Application? Here we will discuss the Android Studio instant run feature.
It's the new method of installing the application on device for debugging. In normal Run, we debug application by click on Run  in the toolbar. It will uninstall the application (if already installed) and install new application. Instant run just propagate the changes in previous application and don't need uninstall and reinstall it. Instant run just Apply Changes in previous installed application. User can use it by clicking on Instant Run Button (See Image)



Instant Run feature is only available, when your work space meet at least the specification

  • Instant Run is not supported for deploying app to app bundle. Deploy it for debug build variant.
  • minSdkVersion must be 15 or higher.
  • Android Gradle plugin version must be 2.3.0 or higher.
  • Target Device(Mobile or Tablet) running Android 5.0 - API level 21 or higher.
User can enable and disable Instant Run feature

  • Go to the Settings/Preferences
    • Windows/Linux, Go to File > Settings
    • Mac OSX, Go to Android Studio > Preferences
  • Then go to Build, Execution, Deployment > Compiler.
  • Check/uncheck the Instant run box.
  • Click OK to save and CANCEL to exit.


Android Studio use different type code swaps to do faster debugging and running app from code it may be hot,warm or cold swap.
HOT Swap is fired when an existing method's implementation is modified, and changes are shown instantly, when call to the change whose implementation was modified. WARM Swap is fired when an existing resource is changed or removed (e.g. anything in the res folder), and restarts the current activity. COLD Swap is fired whenever there is a structural code change in your app's code (e.g. modify the list of implemented interfaces) and restarts the entire app, without reinstall.

Comments