android-studioinstant-run

Android Studio 2.0 Instant Run Not Working


This new feature, Instant Run, is not working always as described. I just modify a paint color in text and Instant Run, it restarts activity! But after modifying some other code, Instant Run works pretty well. Am I missing something?


Solution

  • Instant Run looks like a great tool in our arsenal, just keep in mind it is a new addition to Android Studio 2.0, which is still in Preview (Canary channel), hence there might be some hiccups. As Google says though, they plan to improve it over the coming months. As of this writing, here's what's supported:

    +--------------------------------------+-----------------------------------------+
    |           Code Change                |         Instant Run Support             |
    +--------------------------------------+-----------------------------------------+
    | Change instance method implementation| Supported                               |
    | Change static method implementation  |                                         |
    | Add or remove a class                |                                         |
    |--------------------------------------|-----------------------------------------|
    | Add, remove, or change               | Supported but requires an Activity      |
    | a string resource                    | restart.                                |
    +--------------------------------------+-----------------------------------------+
    

    And here are some code changes that Instant Run does not currently support:

    I've had similar experience testing Instant Run, but this is to be expected at this stage. Hey, it didn't even work few times for Dave Burke during Android Dev Summit ;)