android - <compatible-screens> 在 Google Play 中排除来自 Nexus 5x 的应用

标签 android google-play android-manifest

我正在开发的应用程序在 Nexus 5x 的 Google Play 中不可见。 由于它不支持平板电脑,因此有一个 <compatible-screens> list 中的部分(如 documentation 中所建议):

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

但我不能使用<supports-screens>因为this (我需要从平板电脑中完全过滤掉该应用程序):

Caution: If you use the <supports-screens> element for the reverse scenario (when your application is not compatible with larger screens) and set the larger screen size attributes to "false", then external services such as Google Play do not apply filtering. Your application will still be available to larger screens, but when it runs, it will not resize to fit the screen. Instead, the system will emulate a handset screen size (about 320dp x 480dp; see Screen Compatibility Mode for more information). If you want to prevent your application from being downloaded on larger screens, use <compatible-screens>, as discussed in the previous section about Declaring an App is Only for Handsets.

除了向<compatible-screens>添加密度为420的线外,还有其他方法可以解决这个问题吗 ?

最佳答案

根据 Google Nexus 5X 具有 xxhdpi 屏幕,但密度为 2,6。 所以 2,6 * 160 (mdpi) = 416,但根据 Android developers' site可接受的值为 420。 所以只需添加 <screen android:screenSize="normal" android:screenDensity="420" />

更新:新的 5"Google Pixel 具有相同的密度,因此同样的规则也适用于它。

关于android - <compatible-screens> 在 Google Play 中排除来自 Nexus 5x 的应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35009926/

相关文章:

android - 如何在 firemonkey 中获取 Android 5 上的 IMEI?

android - Android 中 APK 文件的最终用户许可证书?

android - 在我的应用中处理 Google Play 更新

android - 在没有市场的Android上安装APK应用程序

android:name ="com.google.android.wearable.watchface.preview"表盘无法识别

android - Cordova 应用程序 : does webassembly supported on Android?

android - 作为开发人员购买 Android 应用程序的通知电子邮件

Android - 为什么当我的应用程序恢复时我的 Activity 被破坏?

Android Market 将我的应用程序隐藏到某些平板电脑(如 Nexus 7)

android - 尝试运行 PhoneGap APP 时 AndroidManifest 出现问题