Android studio 2.0 bug:no changes to deploy
Asked Answered
S

7

29

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?

Suisse answered 11/4, 2016 at 2:54 Comment(4)
It's gradle bug, you can rebuild project and run it again.Metalloid
(seeing the same problem on ubuntu, so it's not windows-specific)Audrit
I had seen problem,but after clean project solved.Hyperplasia
please check this and this answer.Undervest
H
25

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

Hornbook answered 11/4, 2016 at 2:58 Comment(1)
Unfortunately this bug is still here for the final 2.0 release. I have seen this many time through out the betas, and still have no idea how to recreate this. When it happens, the only solution is to clean and start over. Really annoying!Metallic
L
10

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

Lysin answered 11/4, 2016 at 20:55 Comment(0)
A
3

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

Adjective answered 11/4, 2016 at 14:17 Comment(0)
C
1

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.

Calling answered 3/5, 2016 at 7:8 Comment(1)
I experience this from time to time on mac and AS 2.1.2.Flashgun
L
0

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.

Lysander answered 31/8, 2016 at 17:48 Comment(1)
i am wondering why the top answer is not marked with a green tick as it suppose to beLysander
D
0

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"

Dionnadionne answered 3/1, 2017 at 5:58 Comment(0)
F
-1

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

Ferguson answered 2/5, 2016 at 11:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.