Android studio 3.1 rebuild project each time to see the changes
Asked Answered
L

3

5

After updating my android studio to version 3.1,I have a problem which is :

When I make some changes on my code , then I launch the execution , I get the old execution of code , until I'll rebuild the project or clean it and try again is that a problem ?

PS : this happened with my old projects , i did not tried yet with new projects

Levison answered 6/4, 2018 at 21:28 Comment(0)
W
3

I think you’re facing a BUG in android studio, as declared by google via Twitter.

I quote their 3 tweets:

We've identified an error that affects some users upgrading from AS3.0: source files may not automatically rebuild when running or debugging an application. Please add 'Gradle aware make' to pre-launch steps in the Run Configuration or wait for AS3.1.1 hotfix early next week[1/3]

Also around the time of the release, jCenter (a 3rd party repository which hosts many of the libraries used by Android developers) suffered from an outage (read more on http://status.bintray.com/ ). This caused builds to fail and was an unfortunate coincidence. [2/3]

Even though this was something out of our control, we will try to come up with a way to mitigate this in the future. We apologize for any problems and ask all developers to test your projects on our weekly Canary (and soon Beta) versions of Android Studio and file bugs. [3/3]

Accompanied by their image:

enter image description here

source: https://twitter.com/androidstudio/status/981914636739076097

Wot answered 6/4, 2018 at 21:34 Comment(0)
S
2

Strange, but in Android Studio 3.3.1 I recently had gotten this bug. Nothing changed in AS, but problem appeared. I uninstalled AS, but nothing changed. I could revert to any commit in Git, but had to rebuild a project every time in order to compile.

So, a solution from https://mcmap.net/q/103269/-android-studio-not-deploying-changes-to-app and @Martin Marconcini helped me. I added Gradle-aware make (leaving Task empty).

enter image description here

In my case I didn't add Instant App Provision because turned off Instant Run.

UPDATE

After several days I noticed that compile time had increased. When I removed that task, AS again didn't change the build. So, I added the task again.

Sogdian answered 26/2, 2019 at 9:56 Comment(0)
F
0

Final settings in "edit configuration" which helped to get rid of rebuilding project each time.

Android Studio: Dolphin | 2021.3.1 Patch 1

enter image description here

Fiddle answered 8/4, 2023 at 8:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.