176

How to disable Instant Run in Android Studio 2.0 Preview. When I go to the settings I see it:

enter image description here

and I can not remove the tick from "Enable Instant Run..."

I use Android Studio 2.0 Preview 9, but this error was present in Android Studio 2.0 Preview 7 also.

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
alex
  • 1,845
  • 2
  • 9
  • 12
  • You need to check your gradle version from project `build.gradle`. – Rohit Suthar Feb 03 '16 at 12:09
  • I had exactly same problem with same message because I opened settings before project was loaded. Re-opening settings after a while fixed my problem and I was able to uncheck that checkbox. – VoW Aug 05 '16 at 14:46

7 Answers7

234

UPDATE

In Android Studio Version 3.5 and Above

Now Instant Run is removed, It has "Apply Changes". See official blog for more about the change.

we removed Instant Run and re-architectured and implemented from the ground-up a more practical approach in Android Studio 3.5 called Apply Changes.Apply Changes uses platform-specific APIs from Android Oreo and higher to ensure reliable and consistent behavior; unlike Instant Run, Apply Changes does not modify your APK. To support the changes, we re-architected the entire deployment pipeline to improve deployment speed, and also tweaked the run and deployment toolbar buttons for a more streamlined experience.

Now, As per stable available version 3.0 of Android studio,

If you need to turn off Instant Run, go to

File → Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run.

enter image description here

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
  • No, I still see that I have shown in the screenshot. I can not turn off this feature – alex Feb 04 '16 at 14:09
  • 5
    If you see some really weird problems crop up (after changing resource xml files, for example) - try turning off instant run or uninstall your app to force a re-install. I lost a couple of hours chasing a "phantom" problem that was instant run related - so now I just turn it off and sip some beverage while compiling / installing. The app in question is huge (a derivative of iosched) and so is pretty impossible to try to isolate a test case to submit to google, sorry about that... Life is too short to spend all of it isolating test cases, have to move on with what works. – Jim Andreas Jun 30 '16 at 16:10
  • 4
    Didn;t you see that he IS NOT ALLOWED to uncheck it. For me it's not an answer – murt Aug 04 '16 at 14:05
  • Check android studio version mentioned in my answer and try again hope that helps – Amit Vaghela Aug 04 '16 at 14:40
  • update to latest stablel version 2.1.2, your problem will be solved that is a beta version of studio.@murt – Amit Vaghela Aug 05 '16 at 03:53
  • @AmitVaghela I meet this issue even on 2.1.2 , however I fixed it somehow, but dont remember currently how.. – murt Aug 19 '16 at 11:09
  • there are some bugs in instant run function please check http://stackoverflow.com/a/37207831/2826147. – Amit Vaghela Sep 29 '16 at 03:54
  • In recent version of Android Studio (I have checked 2.2.2) the "settings" is merged with "SDK Manager". This option is NOT available from File menu ( now it is File -> Other Settings -> Default Settings), as mentioned in the answer. – Paul Nov 10 '16 at 13:18
  • I'm using version 3.0 of Android Studio and the box for enabling Instant Run is grayed out, so I can't uncheck it. How can I solve this? – Larpee Dec 07 '17 at 22:09
  • try, installing again after uninstallation of android studio. – Amit Vaghela Dec 08 '17 at 05:38
  • 1
    This proposed remedy worked for me. I was able to immediately build, install the apk and run the app. – BenJaminSila May 25 '18 at 01:59
  • This works, are there any downsides to disabling *Instant Run*? – JMK May 17 '19 at 19:02
  • 1
    @JMK no, there are no downside of disabling. – Amit Vaghela May 18 '19 at 03:17
40

Using Android Studio newest version and update Android Plugin to 'newest alpha version`, I can disable Instant Run: Android studio Instant Run view with Version highlighted Android studio Project view with Android Plugin Version highlighted

Try to update Android Studio.

Community
  • 1
  • 1
zxbin
  • 656
  • 5
  • 13
13

I had the same exact isuue with the latest Android Studio 2.3.2 and Instant Run.

here what I did : (I'll give you two ways to achive that one disable for specefic project, and second for whole android studio):

  1. if you want to disable instant-run ONLY for the project that is not compatible (i.e the one with SugarORM lib)

on root of your projct open gradle-->gradle-wrapper.properties then change the value distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

and on your project build.gradle change the value

classpath 'com.android.tools.build:gradle:2.2.3'

enter image description here

  1. If you want to disable instant-run for all project (Across Android Studio)

in older version of AS settings for instant run is

File -> Other Settings -> Default Settings ->Build,Execution,Deployment

However In most recent version of Android Studio i.e 2.3.2 , instant run settings is:

  • for Android Studio Installed on Apple devices -> Preferences... (see following image)
  • for Android Studio Installed on Linux or Windows -> in File-> Settings...

enter image description here

enter image description here


Edited: If for any reason the Instant-run settings is greyed out do this :

Help-> Find Action... 

enter image description here

and then type 'enable isntant run' and click (now you should be able to change the value in Preferences... or file->Settings... , if that was the case then this is an Android Studio bug :-)

enter image description here

bastami82
  • 5,955
  • 7
  • 33
  • 44
  • The solution for only one project downgrades to a much older version of gradle, which shouldn't really be recommended as it also disables a lot of other new features and potentially is a security risk. This should be stated in the post. – Maxr1998 Aug 19 '17 at 22:55
12

Turn off Instant Run from Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run.

enter image description here

Biswajit Karmakar
  • 9,799
  • 4
  • 39
  • 41
5

the design in android 2.3 (stable version) is slightly changed.

File → Settings → Build, Execution, Deployment → Instant Run and uncheck Enable Instant Run.

enter image description here

quantum apps
  • 938
  • 2
  • 13
  • 25
3

Update August 2019

In Android Studio 3.5 Instant Run was replaced with Apply Changes. And it works in different way: APK is not modified on the fly anymore but instead runtime instrumentation is used to redefine classes on the fly (more info). So since Android Studio 3.5 instant run settings are replaced with Deployment (Settings -> Build, Execution, Deployment -> Deployment):enter image description here

Kiryl Tkach
  • 3,118
  • 5
  • 20
  • 36
1

I tried all above but nothing helps, at last i just figured out that under setting >> apps, device still has an entry for uninstalled application as disabled, i just uninstalled from there and it starts working.

:) might be useful for someone

RQube
  • 954
  • 3
  • 13
  • 28