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?
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
Solved by rebuilding Project (menu Build -> Rebuild project)
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
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.
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.
Not a solution but as a better workaround I'd prefer to:
Press "Recent Apps"
Simply close my app from the list
Run the app again
This takes less time than Clean and Rebuild.
Update:
Rerun the app also works:
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"
I also used clean and rerun app or Cntrl+F5 this fix my problem
Related
i'm trying to install my app debug from my android studio. it's work well yesterday, but today when i try to install it again, the application cant be installed on my device and showing error like below on my android studio.
Installation did not succeed.
The application could not be installed: SHELL_UNRESPONSIVE
The device timed out while trying to install the application.
Retry
what should i do? i tried install on other device, and it worked fine. My device is Redmi 4X and other device is Samsung J3
Faced the same issue, not sure of the reason but in Android studio, Click on the File -> Invalidate Caches/ Restart and then it starts to work.
I got same issue with my device. i restart my device and its work properly.
The problem is because you don't have the proper SDK for the Android version. I'm telling you because a month has passed for me too. The solution is to download the appropriate pack in the SDK Manager.
If you have doubts how to enter:
Close the project.
In the welcome panel click on settings, then choose the SDK Manager option.
Click show package details and select the version for Android and choose all packages.
Finally you click ok XD
Try this method if it works perfect greetings
If other answers didn't help and previously application was installing correctly on your device, try to check your AndroidManifest file. Check that nothing forbids to install your app because of os version conflict or manifest merging errors or other reasons.
I came across this problem recently, through process of elimination I determined the cause was related to dependencies in the build.gradle(your app name).
I suggest working backwards and comment out everything that was added since the last known working build/install.
In my case I have a legacy app developed back in 2016 being rewritten, dependencies for signalR have changed quite a bit since then, the original libs where causing the install to fail while everything else seemed excellent, not even a single build error was occurring. Commenting out the libs and references got the application to a runnable state.
In my case, I deleted the emulator and recreated it. It solved the issue.
Before this, I had already tried following which did not work for me:
From menu: File->Invalidate cache/restart.
Deleting .cxx, .idea, .gradle, build folders and rebuilding.
Cold boot device emulator
Posting this in case someone is trapped in my kind of situation.
My android project has over 30 build flavors and I started seeing the slowdown. Android Studio just keeps freezing whenever I type a character or add a new line.
Filed a bug with Google but haven't heard back.
Has anyone run into this issue before?
Any help will be very appreciated.
Have you tried disabling Instant Run?
I would need more info on your config but it sounds like you probably have Instant Run enabled. The larger and more complex your project becomes, the higher the impact on IDE performance.
If you haven’t tried already, it’s worth a shot:
Android Studio -> Preferences -> Build, Execution, Deployment -> Instant Run
You may need to uninstall Android Studio. After a while it starts to present these freezes kind of without explanation. Whenever I face this type of problem in the IDE I reinstall it and it returns to normal.
I'm on Windows. I created a new project on Android Studio for Marshmallow at least.
The only thing I've done so far is generating the main activity which is a tabbed activity with view pager. Also, you should know that this project is a private git repo that I cloned.
I'm working on this project with another developer and the project is perfectly working on his side.
The problem is:
When I try to launch the app (wether it is a virtual device or my real phone), the gradle build gets stuck at the app:processDebugResources step. I waited more than an hour and nothing happened. Moreover, when I want to cancel the gradle build, it doesn't respond and I have to kill Android Studio process. Then I restart Android Studio and I have to kill a gradle process that prevents the initial gradle build (at Android Studio startup) from working.
The crazy thing is that I was able to launch the app before. I even installed it on my phone!
What I've tried so far:
Do what stackoverflow was giving as solutions like tick the offline mode in the settings
Create a new project --> It doesn't change anything
Reinstall Android Studio --> It doesn't change anything
Deactivating Avast antivirus
Invalidate cache/restart + Clean + rebuild (the rebuild gets stuck like when I try to launch the app)
And maybe other solutions that I forgot...
It's getting very annoying as it's making me lose days of development.
If you have any more solutions, or if you think I should try again some of the previous solutions, help would be greatly appreciated !
I know this is an old post, but I faced the same problem during the last few days and since i got crazy I hope I can help someone else out there.
After many hours of troubleshooting I found that the Java Platform SE binary executable goes in "suspended mode" in Windows 10, preventing Android Studio from compiling (it hangs at app:processDebugResources).
Example Screenshot
Killing the suspended process and recompiling the project works just fine... until Java gets suspended again.
Maybe your gradle version is not compatible with it. Try again with latest version of gradle in your project.
I did several things:
Install NDK
Change JDK from embedded one to Jdk 8
Redownload SDK i was using (6,7,8)
And now the problem is solved ! I have no idea which of these things made the tricks but I'm happy ! It may be useful to someone else one day.
What I have tried:
I have disabled, enabled the instant run multiple times.
I have tested the instant run on many projects.
I tried Invalidate Caches and Restart.
I tried to change on XML only, Java only, static fields, variables. all the cases restarts the whole app.
Still the instant run button restarts the app always.
The devices i use for testing are
Motorolla Moto G4 Android 6.0.1 and Samsung Galaxy s4 Android 5.1
Any solution for this problem ?
Seems like There's a bug in Android Studio 2.3(24Feb2017 Build)I have Workaround for Instant Run.
Working for me:
com.android.tools.build:gradle:2.3.0'
Not Working for me:(>2.3.0)
com.android.tools.build:gradle:2.3.1'
So You could try 2.3.0 for Project-level build.gradle
Welcome to #AndroidDev :)X)
I know it's been a long time since the question but I find myself in the same problem and I just discovered the solution:
In Gradle (Module: app)
buildTypes {
...
debug { multiDexEnabled true }
}
The mutidex was enabled in debug mode this was causing in my case the failure in instantrun at android studio 2.3.3
Just a little hint. When I switched from Android Studio 1.5 to 2.0 (stable) the new Instant Run didn't work with layout changes. I tried Run > Clean and rerun app and I solved, since that moment Instant Run works.And please refer below link.I hope it will help you out
Android Studio 2.0: Why does Instant Run not work when modifying xml layout resources?
or you can further refer below link for configuration
Android Studio 2.0 Instant Run Not Working
I also had a same problem after update "Android Studio 2.3"
Even small xml change went full install.
message : "Instant Run applied code changes and restarted the app. Static Initializer Change"
So I started to find which one made this problem from libraries I use.
and when I remove realm dependency from my code, Instant run work properly.
hmm. It's not a perfect solution. but this might be a clue.
ps - removing dependency is little bit annoying. so first time I removed realm initialize code but it is not working. only remove all realm dependency will work...
I had the same issue. For running the app its Shift+F10 for applying changes its Ctrl+F10. Try it. Hope it works.
Android Studio 2.1 instant run is not updating the app on the device
I observed an issue with AndroidStudio 2.1. When I run the app with small java code changes, it doesn't update app on the device sometimes. Instead it shows a message
No changes to deploy // (Don't show again)
Am I missing any thing here?
As a work around I do clean build every time in order to reflect the changes in app.
Upgrade Android studio version to 3 or more. this bug is resolved.
This was a bug on version 2.0 instant run and issues were reported check these links
https://code.google.com/p/android/issues/detail?id=199884 https://code.google.com/p/android/issues/detail?id=195062
https://code.google.com/p/android/issues/detail?id=206698
https://code.google.com/p/android/issues/detail?id=209413
https://code.google.com/p/android/issues/detail?id=206627
thing to do would be to disable Instant Run entirely by
Settings > Build, Execution, Deployment > Instant Run > Enable
Instant Run
You can file a bug at this link: Google Issue Tracker
please check this answer https://stackoverflow.com/a/35169716/2826147 to turn it off.
Thats a bug in Android Studio, I noticed it in build 2.0 sometimes it failed to update, so what i do is I rebuild the entire project, one more thing, if you have multidex enabled and your device is not running 5 <it will not work, make sure its disabled and rebuild your project.
I have just noticed that whenever i closed my app and then run it worked. See my post here.
https://stackoverflow.com/a/37357665/5923606