Google 播放:华为Nexus 6P与应用不兼容

Google Play: Huawei Nexus 6P is not compatible with the app

我有一个 Android 应用程序,但仅限于手机。我使用以下代码只允许手机从 Google Play

下载应用程序
<!-- Only permit app to be used on handsets, prevent tablets -->
    <compatible-screens>
        <!-- all 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" />
        <!-- all 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" />
        <!-- LG G3 QHD Resolution -->
        <screen android:screenDensity="640" android:screenSize="small" />
        <screen android:screenDensity="640" android:screenSize="normal" />
        <screen android:screenDensity="640" android:screenSize="large" />
        <screen android:screenDensity="640" android:screenSize="xlarge" />      
    </compatible-screens>

今天,一位用户报告 Google Play 告诉他们他们的设备与该应用程序不兼容。他们使用的是 Verizon Wireless Huawei Nexus 6P 运行 Android 6.0 Marshmallow。

我猜想我需要向清单的节点添加更多内容以支持此设备,但我不确定它的 screenDensity 是多少。我怎样才能让我的应用程序支持这个设备?

当我在 Android Studio 中为这个确切的设备创建一个模拟器时,应用程序在它上面运行得非常好。

将此添加到屏幕尺寸

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

它有望解决您的问题

不完全是 OP 问题的答案,但是我的一个应用程序有完全相同的问题,没有使用任何兼容屏幕限制。所以这可能对其他有同样问题的人感兴趣

必须添加此项才能覆盖另外 178 台设备,包括 Nexus 6P。我假设并非所有这些都是 6P 所必需的,很可能 anyDensity 就足够了:

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

只支持手机,我想这应该足够了:

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