18

This is very annoying aspect of the new android studio version 3.1, I used to launch run command after every code changes, the IDE rebuilds the (whole project & APK) and then deploys it on the target device.

Then after upgrading to version 3.1, the run command does not rebuild the apk any more, and displays the following error messages.

android studio 3.1 Session 'app': Error Installing APK

android studio 3.1 The APK file Error while Installing APK

so I have click on" rebuild & run" each time I make code modification, how can I restore the old behavior of version 3.0.1

Marcos DaSilva
  • 542
  • 5
  • 17
  • Sounds like there might be a read/write permission issue. Have you tried restarted the IDE or even your entire OS? – BRO_THOM Mar 27 '18 at 08:46
  • Fix in android studio 3.1.1 Check my answer https://stackoverflow.com/a/49746320/3806413 for details. – 0xAliHn Apr 10 '18 at 06:00

2 Answers2

48

Go to Run -> Edit configurations. And then make sure you have Gradle-aware Make option like below screenshot.

enter image description here

If not then click + and select from the

More update in twitter regarding this:https://twitter.com/androidstudio/status/981914632892960768

0xAliHn
  • 18,390
  • 23
  • 91
  • 111
-1

disable the instant run option. Open Settings from File > Settings Navigate to Build,Execution,Deployment > Instant Run Uncheck the enable instant run check box

sree kumar
  • 44
  • 7