javaandroid-studiogradlerebuild

Android studio 3.1 rebuild project each time to see the changes


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


Solution

  • 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