13

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

3
  • Which AS version are you using? Have you tried disabling Instant Run? Preferences -> Build, Execution, Deployment -> Instant Run. Commented Feb 23, 2016 at 12:18
  • Report that problem to them Commented Feb 23, 2016 at 12:31
  • android studio version is 1.5.1 and Instant Run is not visible in Preferences -> Build, Execution, Deployment section Commented Feb 23, 2016 at 12:32

5 Answers 5

4

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.

Sign up to request clarification or add additional context in comments.

3 Comments

i am using android studio version is 1.5.1 and Instant Run is not visible. So do i need to update the android studio?
As android studio is a fast forwarding IDE, I recommend using the latest version of Android Studio, I used to have many difficulties with older versions.
Also using latest SDK tools and plugins
1

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

Comments

0

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.

Comments

0

On Ladybug, I resolved the issue by:

Go to Run -> Edit Configuration -> Check "Always install with package manager (disables deploy opti...)"

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
-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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.