是什么导致此 Android APK 上传错误:“不可升级的 APK" [英] What causes this Android APK Upload error: "Non-upgradable APK"

查看:19
本文介绍了是什么导致此 Android APK 上传错误:“不可升级的 APK"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Google Play 商店中有一个目标 SDK 为 23 的 Android APK.

I have an Android APK in the Google Play store with an Target SDK of 23.

我发布了一个新版本(相同的目标 SDK),Google 向我显示了这个错误:

I have released a new version (same target SDK) and Google shows me this error:

如果我继续(我学会了艰难的方法),那么当前的用户都不能升级到这个版本.我必须恢复代码、增加内部版本号并重建 APK 以回滚"到可用版本.

If I proceed (I learnt the hard way) then none of the current users can upgrade to this version. I had to restore the code, increment the build number and rebuild the APK to "rollback" to a usable version.

但是,我无法弄清楚为什么 google 会向我显示此错误.请注意,0 支持的 Android 设备"是一个红鲱鱼 - 这是过去 24 小时内 Google Play 中的一个已知问题 - 如果您发布 APK,则会显示实际设备数量.

However, I cannot work out WHY google is showing me this error. Note, the "0 Supported Android Devices" is a red-herring - it is a known issue in Google Play in the last 24 hours - if you publish the APK the real number of devices is shown.

请给我一些关于差异是什么或导致此错误的原因:

Please give me some leads on what the difference is or what causes this error:

不可升级的 APK警告此 APK 的所有用户都无法升级到此版本中添加的任何新 APK.小费确保将所有新 APK 添加到此版本中.

Non-upgradable APK WARNING None of the users of this APK will be able to upgrade to any of the new APKs added in this release. TIP Ensure that all your new APKs are added to this release.

推荐答案

我解决了这个问题:-

问题出在版本代码上 - 我确定您没有在您的应用中定义任何版本代码,它是由以下公式生成的:

The issue was with the versioncode - I am sure you have not defined any version code in your App and it is getting generated by this formula:

 versionCode = MAJOR * 10000 + MINOR * 100 + PATCH

但有时最新版本的自动生成的版本代码值会小于以前的版本(在您的情况下为 10403 <104028),这就是它显示不可升级 APK 的原因.

But sometimes auto generated versioncode value of the latest release becomes smaller than the previous release (in your case 10403 < 104028) and that's why it shows non-upgradable APK.

你需要做的是:-

在您的 config.xml 标记中添加如下版本代码:-

In your config.xml in tag add versioncode like below:-

android-versionCode="104280" 

104280 对您有用,因为它比旧版本更好.

104280 will work for you as it is greater than older version.

现在发布它,没有任何错误.

Now get it published without any error.

谢谢桑尼

这篇关于是什么导致此 Android APK 上传错误:“不可升级的 APK"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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