Whenever I make a code change in the Android Studio (version 3.0.1) I need to clean before I build in order for that change to take effect. Making a change and hitting the green arrow build/run button looks like it builds but the new changes are not incorporated unless the project is cleaned beforehand. For example, if I add some logging then build/run, the new logs don't appear until I clean then build/run again. This seems to be the case for almost all changes. Sometimes it works, most of the time it doesn't.
The compiler should detect changes to the code and rebuild those files every single time. It feels like they prioritized build speed over correctness. Has anyone else solved this problem? If not then is there some setting that forces a clean before every build/run?
I had the same issue after updating Android Studio to version 3.1. It seems that the Before launch
action of the default run configuration has been changed to Instant App Provision
. Check it out and change to Gradle-aware Make
here:
I experienced that when I left my Android Studio opened for a long time. The solutions I found were:
I hope this helps you.
This suddenly started:
Code changes were not being reflected on the app / were not taking effect.
My "Run / Debug configurations" settings were as said by @4emodan.
Still, i was facing the problem.
"File -> Invalidate Caches / Restart ..."<br>
made it.
This could have been the result of my machine intermittently rebooting (because of hardware issues).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With