Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
275 views
in Technique[技术] by (71.8m points)

google play - Android app is supported by 0 devices

I'm having trouble with the Google Play store that insists that my app is supported by 0 devices. I've tried all the solutions I found on SO and elsewhere. This isn't about the apk being inactive, it gets activated be default and I've even tried to deactivate and reactivate it.

I've tested it on my Galaxy Nexus and it works very well, there's no reason for it to be incompatible with every single Android device...

Here's my manifest file:

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="17" />

<supports-screens
    android:anyDensity="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:resizeable="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />

<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.INTERNET" />

<uses-feature
    android:name="android.hardware.accelerometer"
    android:required="true" />
<uses-feature
    android:name="android.hardware.screen.portrait"
    android:required="false" />

The full project source can be found here: https://github.com/Nurgak/Android-Bluetooth-Remote-Control as it's open-source.

This is what I see on Google Play. enter image description here

The 5 features being

android.hardware.ACCELEROMETER
android.hardware.BLUETOOTH
android.hardware.CAMERA
android.hardware.camera.AUTOFOCUS
android.hardware.TOUCHSCREEN

And 4 permissions

android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN
android.permission.CAMERA
android.permission.INTERNET

I'm absolutely appalled by their support too, I've only gotten generic "hey have you looked at our FAQs?" replies to e-mails.

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I had faced a similar issue when I had declared camera hardware in uses-feature tag in manifest file in my application as follows:

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

If you don't specify the android:required attribute it defaults to "true". Thus, Google Play Store will assume that the application will not work unless the camera hardware is present.

Once you set android:required to false as given below, Play Store will accept the APK and will show a list of devices available for the application.

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

You may also look for misspellings on features descriptors. For supported feature descriptors see http://developer.android.com/guide/topics/manifest/uses-feature-element.html#features-reference

For more information: http://developer.android.com/guide/topics/manifest/uses-feature-element.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...