Android架构使用情况? [英] Android architecture usage?

查看:92
本文介绍了Android架构使用情况?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些本机库,它们很大,而且会使应用程序二进制文件的大小膨胀.我查看了 APK拆分,但是维护和QAing多个APK是不是我想做的事.

I have a few native libraries that are fairly big and bloating the application binary size. I looked into APK splitting but maintaining and QAing multiple APKs is not something I want to do.

因此,我想使用ndk.abiFilters Gradle属性在发布版本中排除未使用的体系结构. (我想单独留下调试版本,以便我可以在x86上运行HAXM加速的仿真器.)

So I'd like to exclude unused architectures in my release build flavour using the ndk.abiFilters Gradle property. (The debug builds I want to leave alone so that I can run the HAXM-accelerated emulator on x86).

我本来只是想在我的发行版中添加armeabi-v7a和arm64-v8a,但是我不确定是否值得担心我要放弃的其他架构的市场份额.在四处查看之后,我找不到关于ARMv6(armeabi),MIPS,x86或x86_64的市场份额的任何参考.我的直觉告诉我,后三个几乎不存在,但我不确定ARMv6.

I was thinking of just having armeabi-v7a and arm64-v8a in my release flavour, but I'm not sure whether it is worth worrying about the market share of the other architectures I'm dropping. After a lot of looking around I cannot find any reference to market share of ARMv6 (armeabi), MIPS, x86 or x86_64. My intuition tells me that the latter three are almost non-existent, but I'm not sure about ARMv6.

我发现该链接在论坛上,其中包含使用各种架构的手机列表.有什么更可靠的地方吗?也许有%的用户类似于Android版本的仪表板?

I found this link on a forum that has a list of phones that use various architectures. Is there something more reliable somewhere? Maybe with % of users similar to the Android version dashboard?

如果仅为armeabi-v7a和arm64-v8a(或armeabi,armeabi-v7a和arm64-v8a)构建本机库,我还会错过任何其他东西吗?

Anything else I may miss if I just build my native libs for armeabi-v7a and arm64-v8a (or armeabi, armeabi-v7a and arm64-v8a)?

推荐答案

首先,如果您担心二进制大小,那么您实际上并不需要arm64-v8a,所有这些设备都可以运行armeabi-v7a二进制文件美好的.仅当您真的需要从中获得额外的性能时,才值得.

First off, if you're worring about binary size, you don't really need arm64-v8a, all those devices can run the armeabi-v7a binaries just fine. Only if you really need to cram the last extra performance out of it, it might be worthwhile.

关于armeabi和ARMv6;自Android 4.4(2013年10月)以来,Android本身不再正式支持它-自Android 4.0起,它的使用率应降低得多(从该版本开始,AOSP源需要进行修改才能仍然为ARMv6构建).因此,实际上,如果您不支持4.4以下的版本,则可以删除该版本而不会造成任何重大损失.

As for armeabi and ARMv6; Android itself doesn't officially support it any longer, since Android 4.4 (October 2013) - and since Android 4.0 it should be much less common (from that version, AOSP source requires modifications to still build for ARMv6). So in practice, if you aren't supporting versions below 4.4, you can drop that one without any significant loss.

同样,对于x86;这些设备中的许多设备都具有手臂二进制文件令人惊讶的不错的仿真效果,因此这些设备也可以使用armeabi-v7a版本进行管理.

Also, for x86; many of those devices ship with surprisingly decent emulation of arm binaries, so those can manage with the armeabi-v7a version just fine as well.

这篇关于Android架构使用情况?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆