如何防止在使用Xamarin Studio部署期间卸载Android应用? [英] How to prevent Android app from getting uninstalled during deployment with Xamarin Studio?

查看:96
本文介绍了如何防止在使用Xamarin Studio部署期间卸载Android应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我使用Xamarin Studio部署新版本的Android应用程序时,都会先卸载该应用程序,然后再重新安装。这给我造成了一些问题,因为我在设备上使用XPrivacy。

Every time I deploy a new version of an Android app with Xamarin Studio the app gets uninstalled first and then installed again. This is causing some problems for me because I'm using XPrivacy on my devices.

我想知道是否有一种方法可以简单地部署新版本而无需在其中卸载排名第一(例如使用Android Studio或Eclipse进行部署时)?

I wonder if there is a way to simply deploy the new version without uninstalling them in the first place (like when deploying with Android Studio or Eclipse)?

推荐答案

在将应用程序构建和部署到设备时,默认情况下Xamarin将删除任何现有的应用程序数据/缓存。这并不总是理想的,因为它会像全新安装一样重置您的数据。

When building and deploying apps to your device, by default Xamarin will delete any existing application data/cache. This is not always ideal as it resets your data as if it were a fresh install.

要保留数据,您需要更新选项:

To preserve data, you need to update the option:


  • 在Xamarin Studio中,选择工具>选项>项目> Android ...选中在应用程序部署之间保留数据/缓存

  • In Xamarin Studio, select Tools > Options > Projects > Android... Check "Preserve data/cache between application deploys"

在Visual Studio中,选择工具>选项> Xamarin> Android设置 ...选中在应用程序部署之间保留数据/缓存

In Visual Studio, select Tools > Options > Xamarin > Android Settings... Check "Preserve data/cache between application deploys"

执行此操作后,将保留在本地应用程序文件夹中创建的所有共享首选项或数据文件。

Once you do this, any shared preferences or data files created in the local application folder will remain.

这篇关于如何防止在使用Xamarin Studio部署期间卸载Android应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆