I'm using the new Android Studio 2.0 (Beta 6) and I'm facing a serious problem. After updating, I noticed that there were some problems with the Instant Run feature, where it was quite hard to ensure that the application was actually running new code. I disabled the Instant Run feature immediately.
Despite this, I am noticing that Android Studio does not always deploy new code anyway!
I have tested my theory by adding a print when my Activity is created and it doesn't get called. If I close the application (for example by pressing the back button) and then running the code - it works as expected.
I have also verified that it's actually a problem, since old code is run after pressing the run button.
What the F is going on and does anyone know a fix? (Except reinstalling AS 1.5)
Notes and summary:
- There is no lightning bolt on the Run Button
- Activity onCreate Print is not called after pressing run
- Changed code is not updated after pressing run
- Instant Run is turned off in Preferences (And restart activities on code change is on)
- It doesn't happen every time - roughly 50 % of runs