更新后,APK支持的设备比以前更少



我有一个相对简单的应用程序,它已经在谷歌的Play Store中了。

现在我已经对此应用程序进行了更新。这次更新的一点是我包括了ZBar扫描仪。其余的变化很小,不应该对我的问题产生任何影响。

我刚把我的应用程序的最新版本放在Play Store中,我收到了以下警告:"警告:活动APK支持的设备比以前活动的APK少。一些用户将不会收到更新。">

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

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

现在,我将此APK添加到Play Store并更新了我的应用程序,我收到了测试设备的警告。无论是我的HTC Wildfire,还是我的三星Galaxy 3都无法更新新版本。

有人能帮我解释一下问题出在哪里吗?

非常感谢!!!

编辑:

我的清单:

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

首先,所用设备的任何更改都必须是清单的结果。这是安卓市场(Google Play)唯一用来确定应用程序可以使用哪些设备的东西。正如你所展示的,唯一的区别是你需要自动对焦。如果您将这一行更改为以下行,它应该可以工作。

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

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

我还应该注意到,我看到你的主应用程序不需要摄像头,但zbar需要摄像头。这也可能产生影响。

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

我在谷歌的Play商店发布了应用程序。当我尝试在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"/>

奇怪的是,经过长时间的搜索解决方案,我完全删除了supportscreens标签,并为<uses-feature android:name="android.hardware.camera"/>应用程序设置了android:required="false",从而与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...

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

最新更新