android - Android App 不支持 Google Play 设备目录中的热门设备
问题描述
我们发布了一个 Android 应用程序,但该应用程序仅支持目录中 12,560 台设备中的大约 10,976 台。
其中一些是低于 minSdkVersion 15 的旧设备。但是,有一些更新和更流行的不受支持的设备,例如三星 Galaxy S10,即使我已经在 Android Studio 调试器中对 S10 进行了物理测试并且构建运行正确。
不受支持的设备更值得注意的例子是所有 Google Pixel 设备、Galaxy S8+、S9+ 和 S10+。类似的受支持设备包括常规 S8、S9 和 S10e。
几个月前,我通过在清单中添加 xxxhdpi 和 sw480dp 布局和支持,将支持的设备数量从 9,674 增加到了几乎。以下是我当前的清单和 gradle 详细信息:
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:resizeable="true"
/>
<compatible-screens>
<screen
android:screenDensity="ldpi"
android:screenSize="normal" />
... // also layouts mdpi, hdpi, xhdpi, xxhdpi
<screen
android:screenDensity="xxxhdpi"
android:screenSize="normal" />
<screen
android:screenDensity="ldpi"
android:screenSize="large" />
... // also layouts mdpi, hdpi, xhdpi, xxhdpi
<screen
android:screenDensity="xxxhdpi"
android:screenSize="large" />
<screen
android:screenDensity="ldpi"
android:screenSize="xlarge" />
... // also layouts mdpi, hdpi, xhdpi, xxhdpi
<screen
android:screenDensity="xxxhdpi"
android:screenSize="xlarge" />
</compatible-screens>
//Gradle
compileSdkVersion 27
defaultConfig {
minSdkVersion 15
targetSdkVersion 27
...}
我还有大量不同大小的布局文件夹,主要是:
布局
布局-大
布局正常
layout-sw320dp-hpdi/xhdpi/xxhdpi/xxxhdpi(大部分手机似乎都在这4个文件夹中)
布局-sw480dp
布局-sw600dp
布局-sw720dp
我可以为其他尺寸的每个密度添加文件夹,但在 Android Studio 中,一些不起作用的手机被列为映射到上面的一些布局。似乎我已经拥有的很多布局都没有使用,因此添加更多而不表示需要它们似乎效率低下。
我还缺少什么,例如更改目标sdk吗?有谁知道 Pixel 手机和 Galaxy S+ 手机需要哪些特定布局,我是否应该支持它们?
解决方案
您几乎不需要使用supports-screens
or compatible-screens
。事实上,文档用compatible-screens
粗体红色大写字母表示:
注意:通常,您不应使用此清单元素
推荐阅读
- bash - 从重定向到日志文件的程序输出中删除进度条
- android - 安卓手表是否可以直接(不带手机)连接服务器(带IP和端口)?
- mysql - Alteryx 工作流计划卡在队列中
- python - 如何处理“ NotADirectoryError: [Errno 20] Not a directory:”
- visual-studio - 在两个打开的编辑器之间切换
- python - 如何从 csv/tsv 加载 Pandas DataFrame 作为分解类别类型?
- javascript - 防止输入在内容可编辑的 div 中写入新行
- android - 毕加索无法加载图像..一直显示空白图像
- javascript - 如何将输入类型更改为Javascript中的文本
- javascript - 如何排除正则表达式字符串中的类?