Xamarin - 在不工作的部署之间保留设备上的应用程序数据/缓存 [英] Xamarin - Preserve application data/cache on device between deploys not working

查看:17
本文介绍了Xamarin - 在不工作的部署之间保留设备上的应用程序数据/缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从生产(来自 Google Play)-> 当前(我的本地代码附加到调试器)执行一个简单的升级测试,但是 在部署之间保留设备上的应用程序数据/缓存 Xamarin for Visual Studio 和 Xamarin Studio 中的功能似乎完全损坏.即使我正在调试/部署的应用程序的版本号大于当前安装的版本号,它也会在安装新应用程序之前将其完全删除,从而清除共享设置/数据/缓存.显然,这有效地使其成为全新安装而不是升级.这是我要测试的场景:

I'm trying to perform a simple upgrade test from Production (from Google Play) -> Current (my local code attached to a debugger), but the Preserve application data/cache on device between deploys feature in both Xamarin for Visual Studio and Xamarin Studio appears to be completely broken. Even if the version number of the app I'm debugging/deploying is greater than the one currently installed it will completely remove it before installing the new one, blowing away the shared settings/data/cache. Obviously this effectively makes it a clean install and not an upgrade. Here is the scenario I'm trying to test:

  1. 从 Google Play 安装当前版本,登录,做一些事情.
  2. 在设备上调试最新代码,从以前的版本中接管共享设置/数据/缓存(此构建的调试二进制文件使用与生产完全相同的证书签名)

无论我做什么,它都会在每个调试会话中执行完整的删除/安装.事实上,Xamarin Studio 很困惑,它认为从 Google Play 安装的应用程序与我尝试部署的版本相匹配,因此根本没有部署新版本.

No matter what I do it keeps performing a complete Remove/Install with each debug session. In fact, Xamarin Studio is so confused that it thinks the app installed from Google Play matches the version I'm trying to deploy, so doesn't deploy the new version at all.

关于如何解决或解决此问题的任何想法?也许通过直接调用 adb 来手动部署?

Any ideas on how to fix or work around this issue? Maybe by calling adb directly to do deployments by hand?

推荐答案

https://stackoverflow.com/a/50714956/1876355

如果您的设备已植根,这可能是您问题的原因.

If your device is rooted, it can be the cause of your problem.

数据库 (Sqlite-net) 在 Monodroid 上的构建之间不会持续

该设备已被植根(或未植根).我在某处读到这可能是一个问题,所以我按照以下步骤操作:

The device was somewhat rooted (or not). I have read somewhere that this might be an issue so I followed these steps:

  1. 已安装 KingoRoot
  2. 设备已经扎根"(损坏),但使用 KingoRoot 将其扎根,然后崩溃
  3. 尝试再次root成功
  4. 使用 SuperUser 解除设备的 root 权限
  5. 已卸载的 KingoRoot
  6. 现在在编译/调试到设备时保留数据.

这篇关于Xamarin - 在不工作的部署之间保留设备上的应用程序数据/缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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