3

This question has been asked before, but I was not able to find replies consistent with Android Studio 4.0. Actually, Android Studio offers (in Edit Configurations... > Miscellaneous) the "Skip installation if APK has not changed" option, and the relevant documentation reports:

When selected, Android Studio doesn’t redeploy your APK if it detects that it’s unchanged. If you want Android Studio to force an install of the APK, even if it hasn’t changed, then deselect this option. Default: selected

However, even after deselecting such option and running again the app, the APK is not actually reinstalled, as confirmed by the following message in the Event Log:

20:38 Install successfully finished in 106 ms.: App restart successful without requiring a re-install.

Anyone has incurred in this issue and know how to solve it?

Franco
  • 669
  • 2
  • 8
  • 23
  • 1
    You could just add a few lines of code and install it. Then undo the changes and reinstall it. Maybe click Build -> Rebuild Project in between. – einUsername Jul 07 '20 at 19:01
  • [@einUsername](https://stackoverflow.com/users/962638/einusername), thanks. Choosing _Build > Clean Project_ and then _Build > Rebuild Project_ works. It is a little bit uncomfortable, though, and I still cannot understand why the relevant Android Studio option does not work as advertised. – Franco Jul 07 '20 at 19:36
  • 1
    I just tried the checkbox and it seems to have no effect on my pc too. But in my case the event log shows that the install was not skipped in either case. – einUsername Jul 07 '20 at 20:05
  • I had the same problem: AS thinking there was no change to the code when in fact there was. Only thing that worked was removing the current Run configuration and creating a new one. 1 minute solution for a frustrating annoyance – Ivan Morgillo Dec 28 '20 at 17:53

0 Answers0