根据google文档(http://developer.android.com/guide/topics/manifest/compatible-screens-element.html#compatible-screens),我正在使用<compatibile screen>标记来针对我的应用程序的特定屏幕(我试图仅针对手机)。这是我的清单:

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

    <screen android:screenSize="normal" android:screenDensity="420" />
    <screen android:screenSize="normal" android:screenDensity="480" />
    <screen android:screenSize="normal" android:screenDensity="560" />

</compatible-screens>

但是,在谷歌Play商店中,有些设备被列为不兼容,例如三星Galaxy S6、Nexus 5x和Nexus 6p。似乎所有DPI非常高的设备都不包括在内(xxxdpi)。我怎么把这些电话包括在内?

最佳答案

用户可以用这种方式在清单文件中定义

<supports-screens android:resizeable=["true"| "false"]
                  android:smallScreens=["true" | "false"]
                  android:normalScreens=["true" | "false"]
                  android:largeScreens=["true" | "false"]
                  android:xlargeScreens=["true" | "false"]
                  android:anyDensity=["true" | "false"]
                  android:requiresSmallestWidthDp="integer"
                  android:compatibleWidthLimitDp="integer"
                  android:largestWidthLimitDp="integer"/>

更多详情请点击此链接
http://developer.android.com/guide/topics/manifest/supports-screens-element.html

10-07 12:45