Android 实时构建 jars:arm64、armabi、mips、mips64、x86

Android live build jars: arm64, armabi, mips, mips64, x86

我正在使用一个使用本机库的外部库。在我的 APK 中(以及在这个外部库中)单独的 jar 被打包用于:

罐子很大。我想删除其中一些。是否有任何使用 x86 的 LIVE 设备?当我的minSdkVersion = 14时,是否还有其他不再需要的东西,例如armeabi?

Are there any LIVE devices using x86?

有许多 Android 设备由 x86 CPU 提供支持。不过,我猜它占 Android 设备生态系统的 1-2%。引用 this article:

Significant Android tablets using Intel Atom processors...include Nokia's N1, Samsung's Galaxy Tab 3 10.1, the Dell Venue 7 and 8, Tesco Hudl 2, the HP 7 tablet, and a variety of products sold under the brands Acer Iconia; Asus MeMo Pad, PadPhone X and Transformer Pad; Lenovo Yoga and Toshiba Excite Go and Encore.

不过,MIPS 设备要少得多,所以如果你要放弃一种主要架构,我会放弃 MIPS,除非你的应用程序有特定的分发计划需要 MIPS 支持。

如果性能不是很重要,您可以安全地删除所有 64 位库,而不会失去对任何设备的支持。所有 Android 64 位处理器都向后兼容 32 位库。

在 Google Play 开发者控制台中,还可以为每个目标 ABI 上传单独的 APK。这会减少 APK 的大小,因为您不再需要包含所有本机库的开销。警告说这样做会使构建、分发和更新过程变得更加复杂。您可以阅读 Multiple APK support in the Android documentation and about how to version your app when building for multiple architectures.

通过上传仅针对特定架构的 APK,可以获得 Play 商店支持的设备数量。上传 APK 目标 Android 4.0+ 和特定 ABI 时,我的结果是:

armeabi-v7a:  7986 devices
x86:          244 devices

这里是每个架构的 table 示例设备: