简体   繁体   English

在Google Play上发布具有maxSdkVersion值的apk以进行过滤

[英]Publishing an Apk With maxSdkVersion Value For Filtering at Google Play

I've an apk at Google Play with properties below: 我在Google Play有一个APK,具有以下属性:

android:versionCode="1000"
android:versionName="1"

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="19"/>

Devices with api level 8 (2.2 FROYO) and 7 (2.1 ECLAIR_MR1) had a problem wiht this apk because of an unsupported method at those api levels. api级别为8 (2.2 FROYO)和api级别为7 (2.1 ECLAIR_MR1)具有此apk问题,因为这些api级别的方法不受支持。 Anyway, I know the reason of the problem and the solution for it. 无论如何,我知道问题的原因和解决方案。 But I don't want to push update to all of my clients(9+). 但是我不想将更新推送到所有我的客户(9岁以上)。 So I created a version of an apk with properties below: 因此,我使用以下属性创建了一个apk版本:

android:versionCode="1001"
android:versionName="1.1"

<uses-sdk
    android:minSdkVersion="7"
    android:targetSdkVersion="8"
    android:maxSdkVersion="8"/>

This version of my apk was going to be seen by only the devices which are at api level 7 and 8. 我的这个APK版本仅会被api级别7和8的设备看到。

But when I tried to publish it at Google Developer Console, I got error below: 但是,当我尝试在Google Developer Console上发布它时,出现以下错误:

This configuration cannot be published for the following reason(s):
It is forbidden that a device upgrading from API levels 7-8 to API levels in range 9+ should downgrade from version 1001 to version 1000, which would occur when 
Screen layouts containing any of [small, normal, large, xlarge] and 
OpenGL ES versions in range 2.0+ and 
Features containing all of [android.hardware.LOCATION, android.hardware.location.GPS, android.hardware.location.NETWORK, android.hardware.TELEPHONY, android.hardware.TOUCHSCREEN, android.hardware.WIFI].

I've already read documents about maxSdkVersion (I know that it is not suggested to be used) 我已经阅读过有关maxSdkVersion的文档 (我知道不建议使用它)

Also tried similar error's solution at adobe forums which didn't help me. 还曾在Adobe论坛上尝试过类似的错误解决方案 ,但对我没有帮助。

Did you have the same situation? 你有同样的情况吗? Any solutions/workaround for this? 任何解决方案/解决方法?

Thanks in advance. 提前致谢。

I can not publish a "single" apk which is described as version 1001 after my current apk (1000). 我当前的apk(1000)之后无法发布被描述为版本1001的“单个” apk。 To solve my issue, I've 2 choices: 为了解决我的问题,我有2种选择:

  1. I have to publish another apk with the version code 1002, which is designed for +9 devices. 我必须发布另一个版本号为1002的apk,该版本是为+9设备设计的。 Because google says that if the device is upgraded(its api level increases from 8 to 9, device must get the lower version of my apk and it is forbidden.) 因为google表示如果设备已升级(其api级别从8增加到9,则设备必须获得我的apk的较低版本,因此被禁止。)
  2. I have to publish my single apk(1001) for all api levels without maxSdkVersion. 我必须在没有maxSdkVersion的情况下针对所有API级别发布单个apk(1001)。

Both solutions will be an update to 9+ devices which I don't want. 两种解决方案都将是我不需要的9多种设备的更新。

http://developer.android.com/google/play/publishing/multiple-apks.html#HowItWorks http://developer.android.com/google/play/publishing/multiple-apks.html#HowItWorks

...the version codes must increase in correlation with the API level support for each APK, so that users get an update when they receive a system update . ...版本代码必须与每个APK的API级别支持相关地增加,以便用户在收到系统更新得到更新

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

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