0

我在使用 Google Play 过滤时遇到问题。我想隐藏我的设备应用程序,其分辨率最低,然后是 800x480px。我该如何设置?

我尝试:

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

和:

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

第一个解决方案非常糟糕。只有平板电脑可以在 Google Play 中看到我的应用。第二种解决方案也很糟糕,因为它能够在分辨率为 480x320px 的设备上下载应用程序。不幸的是,这个命令android:requiresSmallestWidthDp="480"在 Google Play 中没有被过滤器使用。在此处的文档中很谨慎:

Caution: The Android system does not pay attention to this attribute, so it does not affect how your application behaves at runtime. Instead, it is used to enable filtering for your application on services such as Google Play. However, Google Play currently does not support this attribute for filtering (on Android 3.2), so you should continue using the other size attributes if your application does not support small screens.

有任何想法吗?

非常感谢。


感谢 Manolescu Sebastian 提供带有标签的想法<compatible-screens>。我不知道存在类似这个标签的东西。

解决方案在这里:

<compatible-screens>
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />

    <screen android:screenSize="large" android:screenDensity="ldpi" />
    <screen android:screenSize="large" android:screenDensity="mdpi" />
    <screen android:screenSize="large" android:screenDensity="hdpi" />
    <screen android:screenSize="large" android:screenDensity="xhdpi" />

    <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
    <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>
4

1 回答 1

1

我想你可以试试这个:

<compatible-screens>
<screen android:screenSize=["small" | "normal" | "large" | "xlarge"]
        android:screenDensity=["ldpi" | "mdpi" | "hdpi" | "xhdpi"] />
...

或者

<manifest ... >
...
<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" />
</compatible-screens>
<application ... >
    ...
<application>

来源:http: //developer.android.com/guide/topics/manifest/compatible-screens-element.html

于 2013-07-25T21:44:11.893 回答