7

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

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.

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."

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.

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.

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?

Thanks a lot!!!

EDIT:

My Manifest:

<?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>

And the Manifest of 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>

4

2 回答 2

3

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

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

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

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

于 2012-11-30T12:17:25.123 回答
1

我在平板电脑Zenithink C93 ( http://www.zenithink.com/Eproducts_C93.php )上的应用程序(使用 Zbar 扫描仪)遇到了这个问题。我需要创建与 Zenithink 设备兼容的应用程序。

我在 Google 的 Play-Store 中发布了应用程序。当我尝试在 Zenithink C93 上安装应用程序时出现错误:“此项目与您的设备不兼容

我的清单有这一行:

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

但这对我没有帮助。

我也有这个支持屏幕标签:

<supports-screens
android:smallScreens="false"                                                               android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>

奇怪的是,经过长时间的搜索解决方案后,我完全删除了 support-screens 标签并将 android:required="false"<uses-feature android:name="android.hardware.camera"/>应用程序与 Zenithink 设备兼容。

现在我的清单看起来像这样:

...
<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="15"/>  

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

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

<application...

不是一个好的解决方案,因为应用程序将与几乎所有设备兼容,但也许它会对某人有所帮助。

于 2013-04-10T19:10:55.913 回答