Android Studio Instant Run - Override and rebuild full app

2k views Asked by At

I'm loving the Instant Run feature of Android Studio 2.0 so far. For little tweaks in the current activity it's great. However sometimes I need to make a tweak in an earlier activity and Instant Run either doesn't apply that change or maybe just doesn't rerun that previous activity. I'd like to be able to keep Instant Run as a quick option, but sometimes just want to tell AS to just reload the full app and not use Instant Run.

Is there a quick way to do this? I saw somewhere that there was a 3-step checklist to do it - Stop, Rebuild, Debug. But even that didn't seem to work and obviously was slower than the old method of pressing a single button.

1

There are 1 answers

1
James Lau On BEST ANSWER

This happens because your changed code was never run again, so it's not a bug per se.

In the stable version of Android Studio 2.0, we have added a re-run button enter image description here to the toolbar. If you click it, it will push your changes and restart your app, essentially forcing a cold swap. The restarted process would then have all the changes you want to see because all your new code will get run again.

Hope that helps!