Instant run in Android Studio 2.0 (how to turn off

2018-12-31 06:42发布

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.

6条回答
闭嘴吧你
2楼-- · 2018-12-31 07:15

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

enter image description here

查看更多
呛了眼睛熬了心
3楼-- · 2018-12-31 07:17

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

查看更多
公子世无双
4楼-- · 2018-12-31 07:20

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

查看更多
只靠听说
5楼-- · 2018-12-31 07:28

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

查看更多
深知你不懂我心
6楼-- · 2018-12-31 07:36

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.

查看更多
初与友歌
7楼-- · 2018-12-31 07:37

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

查看更多
登录 后发表回答