如何让你的Andr​​oid应用程序的自动更新你的、自动更新、应用程序、oid

2023-09-05 00:03:09 作者:╰ぅ剪了头发、断了情

晚上好!我发表在谷歌我的第一个应用程序播放的今天,活泉!有一次我看到我的应用程序列在谷歌玩,我意识到我需要做出改变,并发布更新。

Good evening! I published my first app in Google Play today, woot! Once I saw my app listed in Google Play, I realized I needed to make a change and post an update.

我做了我的code的变化,并在清单文件版本加code和VERSIONNAME。然后,我建我的apk文件,使用相同的密钥提交给谷歌发挥原有的apk签名。

I made my code changes and incremented versionCode and versionName in the manifest file. I then built my apk, signed with the same key as the original apk submitted to Google Play.

我上传了一张新的apk,取消原来的apk文件,然后启动了新的,点击保存。

I uploaded a new apk, deactivated the original apk, then activated the new one and clicked Save.

我等了几个小时,看着谷歌播放,可以看到,是的,新的价值,我把VERSIONNAME已经更新了。

I waited a couple of hours, looked in Google Play and could see that yes, the new value I put in versionName had updated.

在我的Andr​​oid手机,我原本安装了第一个版本,但是当我去谷歌上播放的手机,我看到我的应用程序的新版本,但唯一的选项是打开和卸载。

On my Android Phone, I had originally installed the first version, but when I go to Google Play on that phone, I see the new version of my app, but the only options are "Open" and "Uninstall".

什么我需要做的,我在开发控制台,或任何应用程序,所以当我或任何其它用户进入我的应用程序在谷歌的更新选项出现播放?

What do I need to do to my app in the Dev Console, or wherever, so the Update option appears when me or any other user goes to my app in Google Play?

做一些研究在Android开发者,我这样说的:

Doing some research in Android Developer, I read this:

安卓版本code 一个内部版本号。这个数目只用来确定一个版本是否比另一个更近,数字越大,表示更近的版本。这是不向用户显示的版本号;这一数字是由VERSIONNAME属性设置。 该值必须被设置为一个整数,如100。您可以定义它不过你想要的,只要每个后续版本都有一个较大的数字。例如,它可能是一个版本号。或者也可以在翻译XY格式的版本号,以通过在下部和上部16位分别编码的x和y的整数。或者你可以简单地通过一个新的版本发布,每次增加的数量。 http://developer.android.com/guide/topics/manifest/manifest-element.html

android:versionCode An internal version number. This number is used only to determine whether one version is more recent than another, with higher numbers indicating more recent versions. This is not the version number shown to users; that number is set by the versionName attribute. The value must be set as an integer, such as "100". You can define it however you want, as long as each successive version has a higher number. For example, it could be a build number. Or you could translate a version number in "x.y" format to an integer by encoding the "x" and "y" separately in the lower and upper 16 bits. Or you could simply increase the number by one each time a new version is released. http://developer.android.com/guide/topics/manifest/manifest-element.html

后来我发现这一点:

谷歌播放可以管理更新preloaded应用程序,提供满足以下条件: 包名称以pre加载应用程序的相同版本code必须上传到开发者控制台 http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113476&topic=2365760&ctx=topic

Google Play can manage updates to preloaded applications, provided the following conditions are met: Package Name with the same Version Code of pre-loaded app must to be uploaded to the Developer Console http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=113476&topic=2365760&ctx=topic

所以我很困惑,难道我增加版本code与否。我是pretty的肯定,我应该增加它,但随后又更新选项没有显示出来。

So I'm confused, do I increment the Version Code or not. I'm pretty sure I should increment it, but then again the Update option is not showing up.

在此先感谢您的帮助!

推荐答案

恭喜!这是一个非常激动人心的时刻!

Congratulations on your first app! It's a very exciting moment!

是的,你增加你的版本code当你更新你的应用程序。

Yes, you increment your Version Code when you make an update to your app.

当你测试你的更新版本,并安装apk文件到您的设备?您可能已经在不知不觉中更新它。因此,谷歌游戏会检测到您所匹配的版本codeS与设备上的应用程序,您上传的应用程序,将不提供更新它。

When you were testing your updated version, did you install the apk file onto your device? You might have updated it unknowingly. Google play will therefore detect that you have matching version codes with the app on your device and the app you uploaded and will not offer to update it.