什么是使用NDK的便携性有何影响? [英] What are the portability implications of using the NDK?

查看:109
本文介绍了什么是使用NDK的便携性有何影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些操作是要在大朗[]中表现得非常快。我可以看到的唯一选择是使用Android NDK。谁能给上用的是什么NDK确实给我的应用程序而言,其中的设备可以使用的应用程序,什么含义是保持我的应用程序?摘要

我看见你需要指定要编译C $ C $下,如ARM和英特尔这架构。当出现Android的新架构会发生什么?我将有一个新的架构似乎每次更新我的应用程序?

解决方案
  

谁能给一个总结什么使用NDK确实给我的应用程序而言,其中设备可以使用该应用程序

在CPU上运行,你有一​​个NDK只有当设备的.so 将能够运行你的应用程序。

  

和什么样的影响,是维护我的应用程序?

在多CPU架构的测试可能需要硬件中,每个架构。我说可能,是因为...

  

当出现Android的新架构会发生什么?

...我们真的不知道。除了增加ARM7支持,NDK并没有改变它的目标。

目前,有两种主要的非ARM平台为Android,我能想到的:

  • 在英特尔凌动,正在使用的谷歌电视设备。在写这篇文章的时候,NDK并不支持这一点。但是,你不能船舶应用程序的谷歌电视的是,无论是。因此,它可能是NDK的将由我们得到写谷歌电视应用的时间被更新。
  • MIPS。在写这篇文章的时候,NDK并不支持这一点。我不知道有什么计划可能是在这一领域。

可以想象的是,仿真器将出现效仿这些CPU。毕竟,现有的Andr​​oid模拟器模拟ARM5。但是,除非及直至出现这种情况,则需要测试硬件的每个建筑,你打算支持。

  

请问我有一个新的架构似乎每次更新我的应用程序?

只有当你想支持新架构。直到有它的设备可以访问你的应用程序的临界质量,任何新的架构不会是非常重要的。 临界质量可能是从一般的设备销售,也可能是因为你打的OEM协议有你的应用程序捆绑别人的设备上。

  

在code是简单的,但并会在所有的archs。

注意你的字节序。

I need some operations that are to be performed on large long[]s to be very fast. The only option I can see is to use the 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?

I saw that you need to specify which architecture you want to compile your C code for, like ARM and Intel. What happens when new architectures for Android appear? 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

Only devices running on a CPU for which you have an NDK .so will be able to run your app.

and what the implications are to maintaining my app?

Testing on multiple CPU architectures may require hardware for each architecture. I say "may" because...

What happens when new architectures for Android appear?

...we really have no idea. Other than adding ARM7 support, the NDK has not changed its targets.

Right now, there are two major non-ARM platforms for Android that I can think of:

  • Intel Atom, being used by Google TV devices. At the time of this writing, the NDK does not support this. However, you can't ship apps for Google TV yet, either. So, it may be that the NDK will be updated by the time we get to write Google TV apps.
  • MIPS. At the time of this writing, the NDK does not support this. I have no idea what the plans might be in this area.

It is conceivable that emulators will appear to emulate those CPUs. After all, the existing Android emulator emulates 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.

The code is simple though and will work on all archs.

Watch your endian-ness.

这篇关于什么是使用NDK的便携性有何影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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