更新后,APK支持的设备数量少于以前的设备 [英] After update the APK supports fewer devices than previously

查看:114
本文介绍了更新后,APK支持的设备数量少于以前的设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相对简单的应用,已经在Google Play商店中了.

I have a relative simple App that was already in the Play-Store of Google.

现在,我已经对该应用进行了更新. 此更新的一点是,我包括了ZBar-Scanner.其余的更改很小,对我的问题不应该有任何影响.

Now I've made an Update of this App. One Point of this Update was that I include the ZBar-Scanner. The Rest of the changes were minimal and shouldn't have any influence on my problem.

我刚刚将我的应用程序的最新版本放在Play商店中,并收到以下警告: 警告:与以前的活动APK相比,活动的APK支持的设备更少.某些用户将不会收到更新."

I just put the newest verison of my App in the Play-Store and I get following warning: "Warning: Active APKs support fewer devices than previously active APKs. Some users will not receive updates."

我已经从sourceforge.net(http://sourceforge.net/projects/zbar/files/AndroidSDK/)下载了ZBarAndroidSDK-0.2.zip,并按照自述文件中的说明将其导入到我的项目中.

I've downloaded ZBarAndroidSDK-0.2.zip from sourceforge.net (http://sourceforge.net/projects/zbar/files/AndroidSDK/) and import it to my project as it is explained in the README-File.

我在HTC Wildfire S(-> 2.3.5版),三星Galaxy 3(GT-I5800-> 2.2版)和Galaxy Nexus(-> 4.2版)上测试了我的本地应用程序.从来没有问题.一切正常. 我还测试了导出的APK,没有任何问题.

I tested my App local on my HTC Wildfire S (->Version 2.3.5), on Samsung Galaxy 3 (GT-I5800 -> Version 2.2) and on my Galaxy Nexus (-> Version 4.2). There was never a Problem. Everything worked. I also tested the exported APK and had no Problems.

现在,我将此APK添加到Play商店并更新了我的应用,并收到有关经过测试的设备的警告.我的HTC Wildfire和三星Galaxy 3都无法更新新版本.

Now I add this APK to the Play-Store and updated my App and I get the warning for the tested devices. Neither my HTC Wildfire, nor my Samsung Galaxy 3 can update the new version.

有人可以帮我解释一下问题是什么吗?

Can anybody help me and explain me whats the Problem?

非常感谢!

我的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.myproject"
android:versionCode="5"
android:versionName="2.0" 
android:installLocation="preferExternal"
>

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

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>

<application
    android:uiOptions="splitActionBarWhenNarrow"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    >

    <!-- enable the search dialog to send searches to SearchableActivity throughout the application -->
    <meta-data
        android:name="android.app.default_searchable"
        android:value=".SearchableActivity" />

    <activity
        android:label="@string/app_name"
        android:name=".MainActivity" 
        android:screenOrientation="portrait"
        android:theme="@style/Theme.NoBackground">                                  

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>

    <activity
        android:label="@string/app_name"
        android:screenOrientation="landscape"
        android:name=".zbar.ZBarScannerActivity">                            
    </activity>

</application>

以及ZBar的清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="net.sourceforge.zbar.android.CameraTest"
  android:versionCode="1"
  android:versionName="1.0">

<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />

<application android:label="@string/app_name" >
    <activity android:name="CameraTestActivity"
              android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

推荐答案

首先,所用设备的任何更改都必须是清单的结果.这是Android市场(Google Play)用来确定应用可以运行哪些设备的唯一方法.正如您所展示的,唯一的区别是您需要自动对焦.如果将此行更改为以下内容,则应该可以使用.

First of all, any change in the devices used must be a result of the manifest. That is the only thing that the Android market (Google Play) uses to determine what devices an app can go on. As you showed, the one difference was that you had a requirement to autofocus. If you change this line to the following, it should work.

<uses-feature android:name="android.hardware.camera.autofocus" android:required="false">

从本质上讲,这将使您可以使用该功能,但不是必需的.这应该允许与所有以前的设备完全兼容.有关更多信息,请参见此答案.

Essentially, this will allow you to use that feature, but not make it required. This should allow full compatibility with all previous devices. For more information, see this answer.

我还应该注意,我看到相机不是您的主应用程序所必需的,而是zbar所必需的.这也可能有所作为.

I should also note that I saw the camera wasn't required by your main app, but is required by zbar. This could also make a difference.

这篇关于更新后,APK支持的设备数量少于以前的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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