Nexus 6 的正确屏幕尺寸和密度配置是多少?
What is the right screen size and density configuration of Nexus 6?
我的应用没有在 Google Play 控制台中将 Nexus 6 列为受支持的设备。
我读了博客 post 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>
元素如下所示:
<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" />
但是 none 似乎可以解决问题。
我询问了 Google 播放支持并得到了帮助我解决问题的答案。
仍然不能 100% 确定正确的屏幕配置,但看起来
<screen
android:screenDensity="560"
android:screenSize="normal" />
是正确的选项。
不过,由于我的应用程序清单中存在冲突,我的应用程序与 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 需要这个,这可能是正确的方法。
我的应用没有在 Google Play 控制台中将 Nexus 6 列为受支持的设备。
我读了博客 post 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>
元素如下所示:
<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" />
但是 none 似乎可以解决问题。
我询问了 Google 播放支持并得到了帮助我解决问题的答案。
仍然不能 100% 确定正确的屏幕配置,但看起来
<screen
android:screenDensity="560"
android:screenSize="normal" />
是正确的选项。
不过,由于我的应用程序清单中存在冲突,我的应用程序与 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 需要这个,这可能是正确的方法。