Xamarin-如何升级安卓应用并保持安卓数据文件夹下的文件[英] Xamarin - How to upgrade Android app and keep files under android data folder

本文是小编为大家收集整理的关于Xamarin-如何升级安卓应用并保持安卓数据文件夹下的文件的处理/解决方法,可以参考本文帮助大家快速定位并解决问题,中文翻译不准确的可切换到English标签页查看源文。

问题描述

我需要部署用xamarin制作的新版本的我的Android应用程序.我的应用程序存储以下路径中的文件:

android>数据> app.package_name>文件>数据

问题是这些文件在升级后擦除,并且应用程序需要与远程服务器重新同步,是这种行为正常,也是我缺少的东西?

我所做的是升级属性> android清单中的版本号,然后存档并在我的设备上部署生成的apk.

推荐答案

如果您的设备植被,它可能是您问题的原因.

数据库(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. Installed KingoRoot
2. Device "was already rooted" (broken), but rooted it with KingoRoot, then crashed
3. Tried to root it again with success
4. UnRooted the device with SuperUser
5. Uninstalled KingoRoot
6. Now data is preserved when compiling/debugging to the device.

本文地址:https://www.itbaoku.cn/post/1937986.html

问题描述

I need to deploy a new version of my Android app made with Xamarin. My app stores files in the following path:

android > data > APP.PACKAGE_NAME > files > data

The problem is those files are wiped after the upgrade and the app needs to resync with the remote server, is this behavior normal or am I missing something ?

What I do is upgrade the version number in the properties > Android Manifest, then Archive and deploy the generated apk on my device.

推荐答案

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

Database (Sqlite-net) do not persist between build on Monodroid

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

1. Installed KingoRoot
2. Device "was already rooted" (broken), but rooted it with KingoRoot, then crashed
3. Tried to root it again with success
4. UnRooted the device with SuperUser
5. Uninstalled KingoRoot
6. Now data is preserved when compiling/debugging to the device.