我有一个应该在大量设备上支持的应用程序,但是当我将其上传到Google Play时,它表示只支持3个(2263个中).
我的清单看起来像这样(减去活动):
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="MYPACKAGE" android:versionCode="101" android:versionName="@string/app_version" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.READ_CONTACTS" /> <uses-permission android:name="com.android.vending.BILLING" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera.any" /> <supports-screens android:anyDensity="true" android:largeScreens="false" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="false" /> <application android:name=".MYApplication" android:hardwareAccelerated="true" android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@style/RPTheme" > ACTIVITY DECLARATIONS ARE HERE <service android:name="com.parse.PushService" /> <receiver android:name="com.parse.ParseBroadcastReceiver" > <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.USER_PRESENT" /> </intent-filter> </receiver> <receiver android:name="MYPACKAGE.PushReceiver" > <intent-filter> <action android:name="1" /> </intent-filter> </receiver> </application>
另外,我用MYPACKAGE替换了我的包名.
现在我再次看它,也许这与android有关:hardwareAccelerated =“true”?但我的理解是,不支持XML级别的API级别会忽略XML声明.
有人对这里发生的事情有任何想法吗? Play商店是否有其他地方可以查找支持哪些设备?
谢谢你的帮助!
编辑:
看起来它确实是android.hardware.camera.any,如下所述.我用以下代替:
<uses-feature android:name="android.hardware.camera" android:required="false" /> <uses-feature android:name="android.hardware.camera.front" android:required="false" />
我的应用程序现在有2k支持的设备.
解决方法
尝试评论或更改:
<uses-feature android:name="android.hardware.camera.any" />
PackageManager was added in Android 4.2中的等效值.和this issue说:
However,the Play Store needs new logic to provide backwards compatibility for devices with older OS releases,which is not yet ready.
So until that support is in place,don’t use “android.hardware.camera.any”,as any apps requiring it will not yet be installable on devices running pre-4.2 versions.
这是一个月前写的,你的经验表明情况仍然如此.