仅支持 Android 4 及更高版本的 armeabi-v7a 是否安全? [英] Is it safe to support only armeabi-v7a for Android 4 and above?

查看:27
本文介绍了仅支持 Android 4 及更高版本的 armeabi-v7a 是否安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个应用程序,该应用程序主要使用 C++,并像往常一样由 NDK 编译为 .so 库.我们知道,必须为每个 CPU 架构分别构建原生应用程序;所以我对 armeabiarmeabi-v7a 有不同的 so 文件.(我故意省略了 x86mips,因为发布的具有这些架构的 Android 设备并不多.)

I have developed an app which is mostly in C++ and is compiled by NDK to .so libraries as usual. We know that native apps have to be build for each CPU architecture separately; So I have different so files for armeabi and armeabi-v7a. (I deliberately left out x86 and mips, since not many Android devices with these architectures are released.)

但是,它的大小非常大,每个 so 文件占用大约 90 MB 的空间,我想减少它.

However, the size is very big and each so file takes about 90 MB of space and I want to reduce it.

我知道我可以省略 armeabi-v7a,因为向后兼容,但在这种情况下,应用程序会运行得很慢.

I know I can leave out armeabi-v7a, because of backward compatibility, but in that case the app will run very slowly.

考虑到我的应用仅支持 android ICS 及更高版本 (minSdkVersion="14"),我可以安全地删除 armeabi 并假设所有这些新设备使用 armeabi-v7a?或者某些设备可能仍然使用旧的 armeabi 而不是 armeabi-v7a 架构?

Considering the fact that my app supports only android ICS and above (minSdkVersion="14"), Can I safely remove armeabi and suppose that all of these new devices use armeabi-v7a? Or some of the devices may still use the old armeabi and not armeabi-v7a architectures?

推荐答案

Android 4.0 及更高版本的未经修改的原始 Android 源默认不支持 ARMv5/ARMv6(但可以修改为针对 ARMv5/ARMv6 构建 - 那里是在 ARMv6 上运行的自定义版本).我不确定是否可以获得经过认证与此类 Android 版本兼容的 ARMv6 设备,或者它是否仅适用于非官方固件.从 Android 4.4 开始,CDD(兼容性定义)严格要求 ARMv7.请参阅 https://android.stackexchange.com/questions/34958/what-are-the-minimum-hardware-specifications-for-android 了解详情.

The unmodified, original Android source for Android 4.0 and newer doesn't support ARMv5/ARMv6 by default (but can be modified to build for ARMv5/ARMv6 - there are custom builds of it that run on ARMv6). I'm not sure if one can get an ARMv6 device certified compatible with such Android releases, or if it only is applicable for unofficial firmwares. Since Android 4.4, the CDD (compatibility definition) strictly requires ARMv7. See https://android.stackexchange.com/questions/34958/what-are-the-minimum-hardware-specifications-for-android for details on this.

所以是的,如果您的应用需要 Android 4.0,原则上也许您可以放弃 armeabi,但我不确定是否有任何这样的官方保证.如果您需要 Android 4.4,那绝对没问题.

So yes, maybe, in principle, you could drop armeabi if your app requires Android 4.0, but I'm not sure if there is any such official guarantee. If you require Android 4.4, it should absolutely be fine though.

这篇关于仅支持 Android 4 及更高版本的 armeabi-v7a 是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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