简体   繁体   English

使用NDK有什么可携带性?

[英]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平台:

  • Intel Atom, being used by Google TV devices. 英特尔凌动,被Google TV设备使用。 At the time of this writing, the NDK does not support this. 在撰写本文时,NDK不支持此功能。 However, you can't ship apps for Google TV yet, either. 但是,您也无法为Google TV发送应用。 So, it may be that the NDK will be updated by the time we get to write Google TV apps. 因此,在我们编写Google TV应用时,可能会更新NDK。
  • MIPS. MIPS。 At the time of this writing, the NDK does not support this. 在撰写本文时,NDK不支持此功能。 I have no idea what the plans might be in this area. 我不知道这方面的计划是什么。

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.

相关问题 使用 BufferedReader 对效率有何影响? - What are the efficiency implications of using BufferedReader? 在Java中使用原始类型有什么安全隐患? - What are the security implications of using raw types in Java? 使用基数40编码字符串有什么含义? - What are the implications of using base 40 to encode a String? 将类型用于grails服务意味着什么? - What are the implications of using types for grails services? 在Apache Camel中使用动态路由器与DSL选择有什么影响? - What are the implications of using a Dynamic Router versus a DSL choice in Apache Camel? 在现代项目中使用具有较旧语言级别的JAR会对性能产生什么影响? - What are the performance implications of using a JAR with an older language level in a modern project?` 覆盖compareTo有什么含义? - What are the implications for overriding compareTo? 除了代码的可移植性之外,将JavaFX用于android项目而不是android UI本身有什么优势 - What is the advantage of using JavaFX for an android project instead of android UI itself other than portability of the code 私有关键字在java中有什么含义? - What are the implications of private keyword in java? 在Web应用程序中使用SingletonEhCacheRegionFactory和EhCacheRegionFactory对Hibernate二级缓存有什么影响? - What are the implications of using SingletonEhCacheRegionFactory vs. EhCacheRegionFactory for Hibernate 2nd-level cache in a Web Application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM