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

sto*_*fln 2 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" />
Run Code Online (Sandbox Code Playgroud)

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

有任何想法吗?

eye*_*yus 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.
Run Code Online (Sandbox Code Playgroud)