如何使用新的apk升级prevoius apk而不会丢失来自未知资源apk的android中以前的数据 [英] how to upgrade the prevoius apk with new apk without losing the previous data in android from unknown resources apk

查看:20
本文介绍了如何使用新的apk升级prevoius apk而不会丢失来自未知资源apk的android中以前的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用新的apk在不丢失真实设备中以前的apk数据的情况下升级android应用程序?

How to upgrade the android application with out losing previous apk data in real device with new apk ?

推荐答案

有一个 versionCode 元素在 AndroidManifest.xml 中.这是一个整数,每个新版本都应增加其值.所以这个整数的值越高,你的应用程序的版本就越新.因此,要使用 apk 更新您的应用程序,您只需将此数字增加 1 并重新编译您的应用程序,然后像往常一样使用生成的 apk 安装您的应用程序.数据将自动保存.这就是 hockeyapp 为 Beta 测试人员更新应用的方式.

there is a versionCode element in AndroidManifest.xml. This is an integer and its value should be increased for each new version. So the higher the value of this integer, the more recent the version of your app is. So to update your app with apk, you should just increment this number by 1 and recompile your app and use the resulting apk to install your app as you normally would. The data will be automatically saved. This is how hockeyapp updates the app for beta testers.

这篇关于如何使用新的apk升级prevoius apk而不会丢失来自未知资源apk的android中以前的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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