android:为什么我的应用程序"不可用"我的2.3.3设备(市场上)

时间:2012-01-17 11:29:21

标签: android google-play

昨天我发布了我的应用程序并意识到它不适用于我的Android 2.3.3设备。 (不会在搜索结果中进行监听,当我直接访问应用页面时,Android市场告诉我它不适用于我的设备)。

我的清单的线条,可能是问题(IMO)看起来像那样:

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

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

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

我能想到的唯一可以产生影响的是我手机上没有插入SIM卡 - 但我有Wifi访问权限。 (将在晚上用SIM卡试用)

有什么想法吗?

2 个答案:

答案 0 :(得分:9)

应用程序需要自动对焦相机,除非您将“android:required =”false“添加到use-feature标记中。

从文档中,请参阅最后一条if语句:

基于明确声明的功能进行过滤

显式声明的功能是应用程序在元素中声明的功能。功能声明可以包含android:required = [“true”| “false”]属性(如果您正在针对API级别5或更高级别进行编译),它允许您指定应用程序是否绝对需要该功能,并且在没有它的情况下无法正常运行(“true”),或者应用程序是否更喜欢使用该功能如果可用,但设计为在没有它的情况下运行(“假”)。

Android Market以这种方式处理显式声明的功能:

If a feature is explicitly declared as being required, Android Market adds the feature to the list of required features for the application. It then filters the application from users on devices that do not provide that feature. For example:

<uses-feature android:name="android.hardware.camera" android:required="true" />

If a feature is explicitly declared as not being required, Android Market does not add the feature to the list of required features. For that reason, an explicitly declared non-required feature is never considered when filtering the application. Even if the device does not provide the declared feature, Android Market will still consider the application compatible with the device and will show it to the user, unless other filtering rules apply. For example:

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

If a feature is explicitly declared, but without an android:required attribute, Android Market assumes that the feature is required and sets up filtering on it.

答案 1 :(得分:0)

minSdkVersion =&#34; 7&#34;和targetSdkVersion =&#34; 8&#34;但你的设备是2.3.3,等于sdk版本10

This将帮助您了解sdk版本

所以更改manafist文件中的版本范围

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