Play store reports “Your device isn't compatible with this version” but it installs via adb just fine on Nexus7

青春壹個敷衍的年華 提交于 2019-11-28 09:12:08

That's completely correct this behavior: please refer to the official documentation here http://developer.android.com/guide/topics/manifest/uses-feature-element.html.

That's the relevant part:

Declared <uses-feature> elements are informational only, meaning that the Android system itself does not check for matching feature support on the device before installing an application. However, other services (such as Google Play) or applications may check your application's <uses-feature> declarations as part of handling or interacting with your application. For this reason, it's very important that you declare all of the features (from the list below) that your application uses.

So the fact you're able to install the apk through adb is not a proof for a particular device to be filtered off or not.

Also, check here: http://developer.android.com/guide/topics/manifest/uses-permission-element.html

In some cases, the permissions that you request through can affect how your application is filtered by Google Play.

If you request a hardware-related permission — CAMERA, for example — Google Play assumes that your application requires the underlying hardware feature and filters the application from devices that do not offer it.

Update: you've confirmed you're using the Nexus 7 2012, so please refer to this official blog post: http://android-developers.blogspot.ch/2012/07/getting-your-app-ready-for-jelly-bean.html.

Google states "apps requiring the android.hardware.camera feature will not be available on Nexus 7".

If you need that permission because you use the camera in your app, you can do it programmatically as explained in http://developer.android.com/guide/topics/media/camera.html#detect-camera.

This happened to my app a couple of times. It turned out the camera requirement was causing this error when the device user had never used the camera since purchase.

I change the camera requirement to not be required by the following:

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

You should read/follow this link from Reto Meier.

As said in the link from now on you need to specify your app features.

Basically a quick solution is to run aapt dump badging {your apk} and verify which features your app is using. Then add the ones that do not affect your app usability to your manifest with required field set to false. e.g. <uses-feature android:name="android.hardware.camera" android:required="false" />

That should be enough.

This Can be Happen when you give unnecessary permissions.

in my case, i use the permission

uses-feature android:name="com.sec.feature.spen_usp" android:required="true"

When i remove this permission then it works Fine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!