[英]How to support all devices( Both mobile and Tablets) in android?
My app is designed for all devices (both mobile and tablet). 我的应用程序适用于所有设备(移动设备和平板电脑)。 But Some devices are not supported in play store publish. 但是Play商店发布不支持某些设备。 I have included my manifest file also. 我也包括清单文件。
What I have did mistake ? 我做错了什么?
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
android:resizeable="true"
android:requiresSmallestWidthDp="240"
/>
<compatible-screens>
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
<screen android:screenSize="xlarge" android:screenDensity="ldpi" />
<screen android:screenSize="xlarge" android:screenDensity="mdpi" />
<screen android:screenSize="xlarge" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>
You can use the below code in manifest file 您可以在清单文件中使用以下代码
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false" />
One mistake is that you have <compatible-screens>
. 一个错误是您拥有<compatible-screens>
。 If you want to support all screen sizes and densities, delete your <compatible-screens>
element. 如果要支持所有屏幕尺寸和密度,请删除<compatible-screens>
元素。 As it stands, you are missing some densities. 就目前而言,您缺少一些密度。
Also note that "all devices" runs counter to your <supports-screens>
element, where you say that there is a minimum size of 240dp along one side. 另请注意,“所有设备”与您的<supports-screens>
元素背道而驰,您说的是,一侧的最小尺寸为240dp。 This, however, is not being used for Play Store filtering, at least according to the documentation, last I checked. 但是,至少在我上次检查时,至少根据文档,它并未用于Play商店过滤。
Also make sure if you use any features such as telephony etc that the uses-feature option is configured in the androidmanifest.xml 还请确保是否使用了诸如电话等功能,并且在androidmanifest.xml中配置了uses-feature选项。
eg 例如
<uses-feature android:name="android.hardware.telephony" android:required="false"/>
There's quite a few of these for things like bluetooth wifi etc so if any devices don't have these features but you still want the app to install on them then that "required" flag will need to be set. 其中有很多用于蓝牙wifi等功能,因此,如果任何设备不具备这些功能,但是您仍然希望在其上安装应用程序,则需要设置“ required”标志。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.