Forum Visual Studio

Android app keeps getting uninstalled

HortinzHortinz GBMember ✭✭

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?

Best Answer


  • JGoldbergerJGoldberger USMember, Forum Administrator, Xamarin Team, University Xamurai


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

  • HortinzHortinz GBMember ✭✭

    @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


  • HortinzHortinz GBMember ✭✭

    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

  • HortinzHortinz GBMember ✭✭

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

  • TakeShikaTakeShika Member ✭✭
    edited December 2019

    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" ... >

    1. Disable Auto backup on device (may differ per device)
      Settings > System > Backup > App Data > Automatic Restore <- disable this
  • larsvlarsv Member ✭✭

    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.

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

Sign In or Register to comment.