简体   繁体   English

android:maxSDKVersion-无法将APK上传到Alpha

[英]android:maxSDKVersion - couldn't upload apk to alpha

I've faced the problem uploading app to Play Store. 我在将应用上传到Play商店时遇到了问题。 The old "19" version was available for API versions 10 and above. API版本10及更高版本可以使用旧的“ 19”版本。 New "20" version specified maxSDKVersion=22 (not higher Android 5.1). 指定了新的“ 20”版本maxSDKVersion = 22(不高于Android 5.1)。 An error message, when trying to upload "20", says: 尝试上传“ 20”时出现错误消息,内容为:

"it is forbidden that a device upgrading from API levels in the range 10-22 to API levels in the range of 23+ should downgrade from version 20 to version 19, which could happen if...". “禁止将设备从10-22的API级别升级到23+的API级别,将设备从版本20降级到版本19,如果...,可能会发生这种情况。”

This situation clearly specified in documentation : 文档中明确指定了这种情况:

...future versions of Android (beyond Android 2.0.1) will no longer check or enforce the maxSdkVersion attribute during installation or re-validation. ... Android的未来版本(Android 2.0.1以后的版本)将在安装或重新验证期间不再检查或强制执行maxSdkVersion属性。 Google play will continue to use the attribute as a filter, however, presenting users with applications available for download. Google Play将继续使用该属性作为过滤器,但是会向用户展示可下载的应用程序。

Our application not working properly on Android 6, so we should somehow to prevent installs on those devices. 我们的应用程序无法在Android 6上正常运行,因此我们应以某种方式阻止在这些设备上进行安装。

So, there is an answer from Google support: 因此,Google支持人员提供了一个答案:

... The error message is stating that if a user updates the Android version on their device, the configuration of your APKs would cause them to become ineligible for the version they currently have. ...错误消息指出,如果用户更新其设备上的Android版本,则APK的配置将导致它们不符合其当前拥有的版本。

To resolve this issue, always make sure the APK that supports the higher API level always has a higher version code. 要解决此问题,请始终确保支持更高API级别的APK始终具有更高版本的代码。 For example, if an APK with API levels 14 - 17 was version 3 then an APK with API level 18 would have to have version 4. 例如,如果API级别为14-17的APK是版本3,则API级别为18的APK必须具有版本4。

In other cases, you can simply remove the max SDK declaration from your app's manifest. 在其他情况下,您可以简单地从应用清单中删除max SDK声明。 ... ...

And there is no way to add maxSDKVersion limitation in existing app. 而且没有办法在现有应用中添加maxSDKVersion限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM