Nexus 6的合适屏幕尺寸和像素密度配置是什么?

8
我的应用在Google Play控制台中未列出Nexus 6作为支持的设备。
我阅读了博客文章Getting Your Apps Ready for Nexus 6 and Nexus 9,其中提到:
Nexus 6具有量化密度为560 dpi,介于xxhdpi和xxxhdpi主密度桶之间。
有一段文字与我的问题完全相关:
确保您没有在Google Play上被过滤
如果您正在使用AndroidManifest.xml文件中的元素,则应停止使用它,因为它不可扩展,每次推出新设备时都需要重新编译和发布应用程序。但是,如果必须使用它,请确保更新清单以添加这些设备的配置(按屏幕大小和密度)。否则,您的应用可能会被排除在这些设备的Google Play搜索结果之外。
好吧,我必须使用,因为我正在尝试从平板电脑中排除我的应用程序。

我当前在清单文件中的<compatible-screens>元素如下:

<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" />
    <screen
        android:screenDensity="480"
        android:screenSize="small" />

    <!-- 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" />
    <screen
        android:screenDensity="480"
        android:screenSize="normal" />
    <screen
        android:screenDensity="640"
        android:screenSize="normal" />
</compatible-screens>

Nexus 6的正确配置是什么?

我尝试过以下配置:

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

但似乎都没有起作用。

1个回答

6
我向Google Play支持团队提出了问题,并得到了解答,这帮助我解决了该问题。
目前还不能百分之百确定正确的屏幕配置,但似乎……
<screen
    android:screenDensity="560"
    android:screenSize="normal" />

“is the correct option.”的英译中为“是正确的选项。”
我的应用程序与Nexus 6不兼容,因为我的应用程序清单中存在冲突。我使用以下功能要求:
<uses-feature android:name="android.hardware.LOCATION" />
<uses-feature android:name="android.hardware.TELEPHONY" />
<uses-feature android:name="android.hardware.TOUCHSCREEN" />
<uses-feature android:name="android.hardware.WIFI" />
<uses-feature android:name="android.hardware.location.GPS" />
<uses-feature android:name="android.hardware.location.NETWORK" />
<uses-feature android:name="android.hardware.screen.PORTRAIT" />

但正确版本应该列出所有小写字母的特征:
<uses-feature android:name="android.hardware.location" />
<uses-feature android:name="android.hardware.telephony" />
<uses-feature android:name="android.hardware.touchscreen" />
<uses-feature android:name="android.hardware.wifi" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<uses-feature android:name="android.hardware.screen.portrait" />

这有点棘手,因为像<uses-permission>这样的权限。
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

应该使用大写字母列出,但<uses-feature>中的特性应该使用小写字母
我在其他设备上没有遇到过同样的问题,但如果Nexus 6需要这样做,那么这可能是正确的方法。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接