locked
Android app keeps getting uninstalled RRS feed

  • Question

  • User260753 posted

    Every time I run my it uninstall from the device and install it again. I can on the logs:

    "Removing previous version of application..."

    I've enable "Preserve data/cache between application deploys" under Preferences > Projects > Android but it keeps happening. Anything else I need to do?

    Friday, June 2, 2017 3:31 PM

Answers

  • User21936 posted

    @Hortinz,

    Looking around some more I do not think there is a way to prevent the app from uninstalling/reinstalling. The first option you mentioned, "Preserve data/cache between application deploys," serves to make sure that your app's data remains on the device even though the app gets uninstalled.

    The "Fast Deployment" option when selected should just re-compile the changes you made in your project since your last deployment rather than compiling the entire app. I thought this might keep the app from being uninstalled and re-installed, but I guess not.

    However, testing on my end the app only gets uninstalled and re-installed after a clean and rebuild or if I make major code changes, or if the "Fast Assembly Deployment" option is off and I make any change to the code, no matter how small.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, June 5, 2017 7:41 PM

All replies

  • User21936 posted

    @Hortinz

    Do you have the "Fast Deployment" option selected in the Android Project options?

    Friday, June 2, 2017 9:48 PM
  • User260753 posted

    @JGoldberger I do indeed. I did not know that would cause the app to be reinstalled, couldn't find any information about it either. I will have a go at disabling it and let you know

    Thanks

    Saturday, June 3, 2017 9:58 AM
  • User260753 posted

    Hi @JGoldberger

    I did disable "Fast deployment" on all debug builds. Even cleaned the project, re-open VS but it's still reinstalling the application. Any other ideas? Thanks

    Monday, June 5, 2017 8:29 AM
  • User21936 posted

    @Hortinz,

    Looking around some more I do not think there is a way to prevent the app from uninstalling/reinstalling. The first option you mentioned, "Preserve data/cache between application deploys," serves to make sure that your app's data remains on the device even though the app gets uninstalled.

    The "Fast Deployment" option when selected should just re-compile the changes you made in your project since your last deployment rather than compiling the entire app. I thought this might keep the app from being uninstalled and re-installed, but I guess not.

    However, testing on my end the app only gets uninstalled and re-installed after a clean and rebuild or if I make major code changes, or if the "Fast Assembly Deployment" option is off and I make any change to the code, no matter how small.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Monday, June 5, 2017 7:41 PM
  • User260753 posted

    Thanks, I'll give it another try, perhaps with a new project

    Tuesday, June 6, 2017 3:27 PM
  • User368742 posted

    Assuming your problem is NOT that the app gets uninstalled everytime, but is that your app's data (such like DB files) disappears on every deployment, my case was that the Android's Auto backup function was killing everything.

    You can get around this two ways.

    1. Disable Auto backup from app Edit the manifest file and disable allowBackup as following (can't post urls, but you can find details at microsoft's "Xamarin.Essentials: Secure Storage" page).

    <manifest ... > ... <application android:allowBackup="false" ... > ... </application> </manifest>

    1. Disable Auto backup on device (may differ per device) Settings > System > Backup > App Data > Automatic Restore <- disable this
    Wednesday, December 18, 2019 7:28 AM
  • User381871 posted

    FYI I just a saw a similar symptom. Rebooted my Android phone and deleted bin and obj directories under my Xamarin Android project, and the problem went away.

    Friday, December 11, 2020 8:40 PM
  • User398876 posted

    Probably malware or low space, Maybe an app makes it happen

    Thursday, January 14, 2021 11:28 AM