我有一个Android应用程序,我只限于手机。我使用以下代码只允许手机从Google下载应用程序
<!-- Only permit app to be used on handsets, prevent tablets -->
<compatible-screens>
<!-- all 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" />
<!-- all 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" />
<!-- LG G3 QHD Resolution -->
<screen android:screenDensity="640" android:screenSize="small" />
<screen android:screenDensity="640" android:screenSize="normal" />
<screen android:screenDensity="640" android:screenSize="large" />
<screen android:screenDensity="640" android:screenSize="xlarge" />
</compatible-screens>今天,一位用户报告说Google Play告诉他们他们的设备与应用程序不兼容。他们正在使用Nexus6P,运行Android6.0 Marshmallow。
我猜我需要在清单的节点上添加更多的内容来支持这个设备,但是我不确定screenDensity会是什么。我怎样才能让我的应用程序支持这个设备?
当我在Android中为这个设备创建一个仿真器时,这个应用程序运行的非常好。
发布于 2016-02-02 16:33:05
将此添加到屏幕大小
<screen
android:screenDensity="560"
android:screenSize="normal" />希望它能解决你的问题
发布于 2019-03-20 10:24:35
不完全是OP问题的答案,但是我的一个应用程序也有同样的问题,没有使用任何兼容的屏幕限制。因此,对于有同样问题的其他人来说,这可能是他们的利益所在。
必须将此添加到另外178台设备中,包括Nexus6P。我假设并不是所有这些都是6P所必需的,很可能anyDensity就足够了:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />要只支持电话,我想这就足够了:
<supports-screens
android:anyDensity="true"
android:normalScreens="true"
android:smallScreens="true" />https://stackoverflow.com/questions/35157794
复制相似问题