[英]What are the portability implications of using the NDK?
I need some operations that are to be performed on large long[]s to be very fast. 我需要一些要在大long [] s上执行的操作非常快。 The only option I can see is to use the Android NDK. 我能看到的唯一选择是使用Android NDK。 Can anyone give a summary on what using the NDK does to my app in terms of which devices can use the app and what the implications are to maintaining my app? 任何人都可以根据哪些设备可以使用该应用程序以及维护我的应用程序的含义,总结NDK对我的应用程序的作用?
I saw that you need to specify which architecture you want to compile your C code for, like ARM and Intel. 我看到你需要指定你想要编译C代码的架构,比如ARM和Intel。 What happens when new architectures for Android appear? 当Android的新架构出现时会发生什么? Will I have to update my app every time a new architecture appears? 每次出现新架构时,我都必须更新我的应用程序吗?
Can anyone give a summary on what using the NDK does to my app in terms of which devices can use the app 任何人都可以根据哪些设备可以使用该应用程序来总结NDK对我的应用程序的影响
Only devices running on a CPU for which you have an NDK .so
will be able to run your app. 只有在您拥有NDK .so
的CPU上运行的设备才能运行您的应用程序。
and what the implications are to maintaining my app? 以及维护我的应用程序的含义是什么?
Testing on multiple CPU architectures may require hardware for each architecture. 在多个CPU架构上进行测试可能需要每个架构的硬件。 I say "may" because... 我说“可能”因为......
What happens when new architectures for Android appear? 当Android的新架构出现时会发生什么?
...we really have no idea. ......我们真的不知道。 Other than adding ARM7 support, the NDK has not changed its targets. 除了添加ARM7支持之外,NDK还没有改变其目标。
Right now, there are two major non-ARM platforms for Android that I can think of: 现在,我可以想到两个主要的Android非ARM平台:
It is conceivable that emulators will appear to emulate those CPUs. 可以想象,仿真器似乎可以模拟这些CPU。 After all, the existing Android emulator emulates ARM5. 毕竟,现有的Android模拟器模拟ARM5。 However, unless and until this happens, you will need test hardware for every architecture you intend to support. 但是,除非发生这种情况,否则您将需要为要支持的每个体系结构测试硬件。
Will I have to update my app every time a new architecture appears? 每次出现新架构时,我都必须更新我的应用程序吗?
Only if you want to support the new architecture. 仅当您想要支持新架构时。 Until there is a critical mass of devices for it that can access your app, any new architecture is not going to be terribly important. 除非有足够数量的设备可以访问您的应用程序,否则任何新架构都不会非常重要。 "Critical mass" could be from general device sales, or it could be because you strike an OEM deal to have your app bundled on somebody's device. “临界质量”可能来自一般设备销售,或者可能是因为您达成OEM协议以将您的应用捆绑在某人的设备上。
The code is simple though and will work on all archs. 代码很简单,适用于所有拱门。
Watch your endian-ness. 观看你的结尾。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.