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?
Android Studio 2.0 Instant Run Not Working
4.4k Views Asked by AVEbrahimi At
3
There are 3 best solutions below
0

Instant Run feature needs to some rules that;
- Android plugin for gradle version must be 2.0.0 or higher
minSdkVersion
must be 15 or higher- At the same time, if you use multidex support (
multiDexEnabled true
) for your app,minSdkVersion
must be 21 or higher. Otherwise, android studio disables Instant Run.
Ref :
https://developer.android.com/studio/run/index.html#instant-run https://developer.android.com/studio/build/multidex.html#about
But i can still use hot swap feature of instant run at my project even though it's minimun sdk version is 14.
1

What about gradle apt usage e.g. apply plugin: 'com.neenbedankt.android-apt'
?
Does using apt prevent Android Studio Instant Run from hot-swapping the code?
In my case I use Dagger 2 and Instant Run doesn't seem to work.... Am I missing something?
EDIT: NO - IT DOES NOT! :) My installation was obviously missing something - just like during Dave's presentation. Instant Run still seems to be unstable on 2.0 preview 3b...
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:
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 ;)