【问题标题】:Release an Android app only for smartphones with high density and large screen size为高密度大屏智能手机发布安卓应用
【发布时间】:2013-03-02 09:15:25
【问题描述】:

如何限制我的 android 应用程序用于高密度和大屏幕尺寸的手机?我不希望它可用于平板电脑,因为我计划为平板电脑发布不同的 apk。

我在这里阅读了谷歌的文档:Declaring an App is Only for Handsets

并将其添加到我的清单中

<compatible-screens>

<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxhdpi" />

</compatible-screens>

我想知道 Note 2、xperia z 和即将推出的 S4 等设备以及许多其他手机是否 5.0 英寸及以上属于 android:screenSize="normal" 或 android:screenSize="large"

如果我包含 android:screenSize="large" 那么它不会允许 7 英寸平板电脑吗?

【问题讨论】:

  • 你是怎么解决的? android:screenDensity="xxhdpi" 无法为我编译(Gradle:不允许使用字符串类型(在 'screenDensity' 处,值为 'xxhdpi')。据我所知,在支持屏幕的情况下,它不能限制为密度。

标签: android android-manifest


【解决方案1】:

这篇文章可能对你有所帮助:http://developer.android.com/guide/practices/screens_support.html

Xperia Z 和其他设备采用大屏幕尺寸。这些设备上的屏幕密度也是 xxhdpi。如果您只打算使用此版本的应用程序定位平板电脑,我建议您仅支持 xlarge 设备。

你应该使用support screens标签而不是Android开发者网站推荐的compatible-screens

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-23
    • 1970-01-01
    相关资源
    最近更新 更多