OpenFL Android 在 Google Play 上构建和过滤 armv5/armv6 设备

OpenFL Android builds and filtering armv5/armv6 devices on Google Play

我正在使用 OpenFL 构建一个 Android 应用程序以在 Google Play 上发布。我只想针对 armv7 设备,我相信 OpenFL 默认只构建 armv7

但是,在构建 OpenFL 构建系统时,会创建并填充 libs/armeabi 文件夹,而不是 libs/armeabi-v7a 文件夹。这样做的问题是,这使得 Google Play 认为生成的 apk 支持 armv5/armv6/armv7,而实际上它只支持 armv7。这意味着我的应用程序获得了 older/incompatible 设备用户的一些 1 星评价。

关于这个 Github issue,Joshua Granick (jgranick) 解释了为什么构建工具这样做:

Oh and BTW, originally we tried only armeabi-v7, but it failed to run on certain devices. This is why there's the current behavior or using armeabi, and adding armeabi-v7 only if there is an armv5/6 version too

我想知道他提到的问题是什么,会影响到哪些devices/Android版本。根据具体情况,可能仍然可以只进行 armv7 构建并手动将错误设备列入黑名单。

最后一个选项是通过构建 "fat" 来简单地支持 armv5/armv6 设备,或者只为 armv5 构建,我认为这在任何地方都是兼容的。使用 project.xml 文件中的 <architecture> 标签非常容易。如果无法解决 Joshua 提到的问题,我可能会做出权衡。

我还可以使用 Google Play 开发人员仪表板手动将 armv5/armv6 设备列入黑名单,但是为每个 app/apk.[=29= 执行此操作将非常耗时]

所以我的问题是:如何使用 OpenFL 制作 armv7-only Android 构建并让 Google Play 仅允许兼容设备,而不 运行像我上面引用的那样的问题?如果那不可能,那我最好的选择是什么?

这里有相关的 Google Play apk 详细信息,我在构建 armv7 时获得 - 仅:

谢谢!

我得到了关于这个 GitHub issue 的答案。当 apk 中没有 libs/armeabi 文件夹时,某些 armv7 设备或其上的 Android 版本会导致应用程序崩溃。 Joshua 解释了这是如何导致 lime-tools(从 version 1.5.7 开始)设置的:

in my Samsung Galaxy S (perhaps other devices) the applications would not run unless there was a "libs/armeabi" folder

If there are both folders, it prefers the armeabi-v7a directory, but otherwise failed to work. So that's why the tools use only a single folder if you target only armv7, and use both folders if you include armv5 and armv7 both.

I'm not sure of a good solution for this, I think the key point of friction here is the Google Play submission process, which should allow us to account for that.

鉴于此,对我有用的解决方案是简单地构建我的应用程序并支持 armv5/armv6 设备。