I've published an app on Google Play Store but it is unsupported for a number of devices such Sony Xperia Z2, OnePlus2 etc. The manifest file for my app is:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
<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" />
<!-- Only hdpi and xhdpi for 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" />
<!-- all large size screens -->
<screen
android:screenDensity="ldpi"
android:screenSize="large" />
<screen
android:screenDensity="mdpi"
android:screenSize="large" />
<screen
android:screenDensity="hdpi"
android:screenSize="large" />
<screen
android:screenDensity="xhdpi"
android:screenSize="large" />
<!-- all xlarge size screens -->
<screen
android:screenDensity="ldpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="mdpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="hdpi"
android:screenSize="xlarge" />
<screen
android:screenDensity="xhdpi"
android:screenSize="xlarge" />
<!-- Special case for Nexus 7 -->
<screen
android:screenDensity="213"
android:screenSize="large" />
<!-- Special case for Samsung S6, One Plus Two, Note 5 -->
<screen
android:screenDensity="560"
android:screenSize="small" />
<screen
android:screenDensity="640"
android:screenSize="small" />
<screen
android:screenDensity="560"
android:screenSize="normal" />
<screen
android:screenDensity="640"
android:screenSize="normal" />
<screen
android:screenDensity="560"
android:screenSize="large" />
<screen
android:screenDensity="640"
android:screenSize="large" />
</compatible-screens>
I think the issue is for ~400 dpi devices. How can I make these devices supportable for my app?
答案 0 :(得分:0)
来自Android开发者docs
兼容屏幕:
通常,您不应使用此清单元素。使用此元素可以显着减少应用程序的潜在用户群,如果用户的设备具有未列出的屏幕配置,则不允许用户安装应用程序。当应用程序绝对不适用于特定的屏幕配置时,您应该仅将其用作最后的手段。您应该遵循支持多个屏幕的指南,而不是使用此元素,以使用不同的屏幕尺寸和密度的替代布局和位图为多个屏幕提供可扩展的支持。
如果您希望将应用分发到任何类型的设备,无论屏幕大小和密度如何,都应从清单文件中删除<compatible-screens>
标记。
根据我对您的清单文件的理解,您希望支持所有设备。如果是这种情况,请继续从您的清单中完全删除<compatible-screens>
标记。
但是,如果您必须使用<compatible-screens>
标记将应用的可用性限制为某些屏幕类型,则应为所有屏幕尺寸添加<screen>
条目android:screenDensity="480"
,支持具有xxhdpi屏幕密度的设备。您提到的设备Xperia Z2和One Plus 2属于xxhdpi存储桶,添加上述条目将使您的应用程序可用于这些设备。