在没有NDK的情况下开发原生C应用程序android? [英] Developing native C applications android without the NDK?

查看:61
本文介绍了在没有NDK的情况下开发原生C应用程序android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这很奇怪:

有人可以在不使用Android NDK的情况下为Android开发本机C应用程序或库吗?

Is there a way someone can develop native C applications or libraries for Android without using the Android NDK?

在发布NDK之前发生了什么?(它的存在时间不长,我认为它是在一两年前发布的.)

What was happening before the NDK was released? (It's not there for too long, I think it was released only one or two years ago).

推荐答案

在发布NDK之前,开发Android应用程序唯一受官方支持的方法是使用Android SDK并用Java编写应用程序.

Before the NDK was released, the only officially supported way of developing Android applications was to use the Android SDK and writing your applications in Java.

正如其他人所提到的,可以完全独立地交叉编译某些应用程序,然后在有根电话上运行它们.这样做的缺点是显而易见的:很少有人能够运行您的应用程序(他们也需要是root用户,再加上您将无法在Play商店中启动您的应用程序);而且您甚至可能自己在不同设备上遇到兼容性问题,例如如果您依赖于对各种库的动态链接(可能需要这样做以减小二进制文件的大小).

As others have mentioned, it's possible to cross-compile some applications as completely stand-alone and run them on a rooted phone. The downsides of this should be obvious: very few people will be able to run your application (they also need to be root, plus you won't be able to get your application up on the Play store); and you might even run into compatibility problems yourself across different devices e.g. if you rely on dynamic linking against various libraries (which you might need to do in order to keep the size of the binary down).

TL; DR:可能,但有严格限制,不建议使用.

TL;DR: it's possible, but severly limited, and not recommended.

这篇关于在没有NDK的情况下开发原生C应用程序android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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