Rabbit
Rabbit

Reputation: 490

Android studio 2.0 bug:no changes to deploy

I download the latest Android Studio 2.0 from Android Develop Website.

But when I change a line of code and use the "instant run", instead of updating the changes, it prompt me "no changes to deploy".

This will happen on code changes and XML changes.

But when I restart Android Studio, things will works fine for once or twice and then "no changes to deploy" Come again!

I used my old SDK on Android Studio older version. JDK is 1.7.0 Windows7 64

So, is anyone has this same bug?

Upvotes: 29

Views: 6978

Answers (7)

Milad Faridnia
Milad Faridnia

Reputation: 9477

Not a solution but as a better workaround I'd prefer to:

  1. Press "Recent Apps"
  2. Simply close my app from the list
  3. Run the app again

This takes less time than Clean and Rebuild.

Update:

Rerun the app also works:

enter image description here

When Instant Run does not works correctly:

As far as I realized, Instant Run works properly when I change my views ids otherwise it does't recognise changes in xml and gives me "No changes to deploy"

Upvotes: 0

Pavneet_Singh
Pavneet_Singh

Reputation: 37404

Run TAB next to anroid-monitor, sometimes it shows, no changes to deploy mean changes in code has not been added to your app(this bug has been resolved to a great extent).

Sometimes it runs the new app and when you restart your app it shows the old one(this bug has been resolved, officially declared on android site ).

Solution :

  • Disable instant run under your project settings(you can face some error while gradle build if you switch from instant-Run to normal one then Try clean option or if still there's an error then you can delete those files at the path shown by the error)

  • Try to use the latest studio release which has totally improved
    instant-run.

Upvotes: 0

jeffbl
jeffbl

Reputation: 21

Also having this issue with Android Studio 2.1. Turning off Instant Run seems to have fixed it, which is unfortunate, but I was wasting more time failing to understand why old code was being run than Instant Run was saving me! Running Ubuntu, so agree not just a Windows bug.

Upvotes: 1

james
james

Reputation: 1

I also used clean and rerun app or Cntrl+F5 this fix my problem

Upvotes: -1

Alexeev Valeriy
Alexeev Valeriy

Reputation: 540

Solved by rebuilding Project (menu Build -> Rebuild project)

Upvotes: 10

James Lau
James Lau

Reputation: 169

This sounds like a bug. It would be super helpful to our team if you can report the bug with specific repro steps so we can investigate. Without your help, it's going to be very difficult for us to track down these problems. We want Instant Run to work for you.

You can file a bug at this link: https://code.google.com/p/android/issues/entry?template=Android%20Studio%20Instant%20Run%20Bug

Upvotes: 3

Andrew Orobator
Andrew Orobator

Reputation: 8646

A lot of people are having this issue as Instant Run is still quite buggy. The best thing to do would be to disable Instant Run entirely by Preferences > Build, Execution, Deployment > Instant Run > Enable Instant Run

Upvotes: 25

Related Questions