Rezaul Karim
Rezaul Karim

Reputation: 1349

Android Studio not reflecting changes

I am developing an Android app using Android Studio. The problem is that after I changed my code and run the studio, some time the changed version is not reflecting in my device.

Here is what I've tried and solved my problem...

1. Build > Clean Project > Run
2. Build > Rebuild Project > Run
3. Restart device

Do i all time tried this procedure for reflecting the latest code change? It is very boring... I have read the following:

Android Studio is installing old apk on device

Upvotes: 13

Views: 12175

Answers (4)

sifr_dot_in
sifr_dot_in

Reputation: 3593

Turning off "Instant Run" will not be good idea if your app is huge.

Try following:

  1. "File -> Invalidate Caches / Restart ...".
  2. If you are using gradle 6.0 (it has a bug) use another version of gradle.
  3. Go to "Run > Edit Configuration" and under "Before launch:" add "Gradle-aware Make" as shown.

enter image description here

Upvotes: 1

Mark Kowalski
Mark Kowalski

Reputation: 264

I was facing the same Issue. Changed my code in Android Studio and start debugging to verify my implementation. Breakpoints were not hit and nothing of my changes were applied. For me, adding

task clean(type: Delete) {
    delete rootProject.buildDir
}

to build.gradle helped.

Upvotes: 0

user8963581
user8963581

Reputation: 1

First...Clean the project and then rebuild it. If this doesn't works then try to clean cache of Android studio in file menu.

Upvotes: -1

SalmanShariati
SalmanShariati

Reputation: 3893

There is an option called "Instant Run" in android studio that decreases the time of build process. If you use it, it may cause the problem. Try to turn it off.

I'm using Android Studio 2.0 Beta 5 and gradle 2.10 and I recommend using this version or above.

Upvotes: 4

Related Questions