gpt4 book ai didi

android - Nexus 6 的正确屏幕尺寸和密度配置是多少?

转载 作者:塔克拉玛干 更新时间:2023-11-02 18:52:23 25 4
gpt4 key购买 nike

我的应用没有将 Nexus 6 列为 Google Play 管理中心支持的设备。

我阅读了博文 Getting Your Apps Ready for Nexus 6 and Nexus 9其中说:

Nexus 6 has a quantized density of 560 dpi, which falls in between the xxhdpi and xxxhdpi primary density buckets.

有一段恰好是关于我的问题的:

Make sure you are not filtered on Google Play

If you are using the element in the AndroidManifest.xml file, you should stop using it because it’s not scalable to re-compile and publish your app each time new devices come out. However, if you must use it, make sure to update the manifest to add the configuration for these devices (by screen size and density). Otherwise your app may be excluded from Google Play search results on these devices.

好吧,我必须使用 <compatible-screens>因为我试图从平板电脑中排除我的应用程序。

我当前的 <compatible-screens> list 中的元素看起来像:

<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" />

但似乎没有一个能解决问题。

最佳答案

我询问了 Google Play 支持并得到了帮助我解决问题的答案。

仍然不是 100% 确定正确的屏幕配置,但看起来像

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

是正确的选项。


不过,由于我的应用程序 list 中存在冲突,我的应用程序与 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 需要这样做,这可能是正确的做法。

关于android - Nexus 6 的正确屏幕尺寸和密度配置是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28297640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com