Instant run in Android Studio 2.0 (how to turn off)

前端 未结 7 2297
别跟我提以往
别跟我提以往 2020-11-22 05:19

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

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

7条回答
  •  后悔当初
    2020-11-22 05:47

    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'
    

    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...


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

    Help-> Find Action... 
    

    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 :-)

提交回复
热议问题