App not visible on certain devices

2019-09-18 21:45发布

I've published an app on Google Play Store but it is unsupported for a number of devices such Sony Xperia Z2, OnePlus2 etc. The manifest file for my app is:

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

<compatible-screens>

    <!-- small size screens -->
    <screen
        android:screenDensity="ldpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="small" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="small" />

    <!-- Only hdpi and xhdpi for normal size screens -->
    <screen
        android:screenDensity="ldpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="normal" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="normal" />

    <!-- all large size screens -->
    <screen
        android:screenDensity="ldpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="large" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="large" />

    <!-- all xlarge size screens -->
    <screen
        android:screenDensity="ldpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="mdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="hdpi"
        android:screenSize="xlarge" />
    <screen
        android:screenDensity="xhdpi"
        android:screenSize="xlarge" />

    <!-- Special case for Nexus 7 -->
    <screen
        android:screenDensity="213"
        android:screenSize="large" />

    <!-- Special case for Samsung S6, One Plus Two, Note 5 -->
    <screen
        android:screenDensity="560"
        android:screenSize="small" />
    <screen
        android:screenDensity="640"
        android:screenSize="small" />
    <screen
        android:screenDensity="560"
        android:screenSize="normal" />
    <screen
        android:screenDensity="640"
        android:screenSize="normal" />
    <screen
        android:screenDensity="560"
        android:screenSize="large" />
    <screen
        android:screenDensity="640"
        android:screenSize="large" />

</compatible-screens>

I think the issue is for ~400 dpi devices. How can I make these devices supportable for my app?

1条回答
贼婆χ
2楼-- · 2019-09-18 22:29

From the Android Developer docs

compatible screens:

Normally, you should not use this manifest element. Using this element can dramatically reduce the potential user base for your application, by not allowing users to install your application if they have a device with a screen configuration that you have not listed. You should use it only as a last resort, when the application absolutely does not work with specific screen configurations. Instead of using this element, you should follow the guide to Supporting Multiple Screens to provide scalable support for multiple screens using alternative layouts and bitmaps for different screen sizes and densities.

If you want your app to be distributed to any type of device, irrespective of the screen size and density, you should remove the <compatible-screens> tag from your manifest file.

From what I understand from your manifest file, you want to support all the devices. If that's the case, go ahead and remove the <compatible-screens> tag completely from your manifest.

However, if you have to use the <compatible-screens> tag to restrict the availability of your app to certain screen types, you should add <screen> entries with android:screenDensity="480" for all the screen sizes, to support devices with xxhdpi screen density. The devices Xperia Z2 and One Plus 2 you've mentioned fall in the xxhdpi bucket, and adding the above mentioned entries will make your app available for these devices.

查看更多
登录 后发表回答