有没有什么方法可以使用基于 ARM 的计算机进行 Android 开发?

发布于 2024-12-02 00:40:18 字数 91 浏览 1 评论 0原文

我在 Android 开发者页面看到 SDK 需要 x86 计算机。有没有办法使用运行 Ubuntu 的基于 ARM 的 Linux 机器来开发 Android 系统?

I've seen in the Android Developers page that the SDK requires an x86 computer. Is there someway to use an ARM Based linux machine running Ubuntu to develop for Android?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

廻憶裏菂餘溫 2024-12-09 00:40:18

这在某种程度上取决于您所说的“为 Android 开发”的含义。

有许多脚本工具和框架可用于在 Android 上创建应用程序,而无需实际编译任何 java 代码。其中一些甚至是为了在 Android 设备本身上进行开发而设计的。

就传统的 SDK 应用程序而言,大多数 Android 工具链都是开源的,并且可以为任何 posix-ish 平台构建。问题是 java jdk - 您需要获取一些东西来填补在 ARM 系统上运行的工具链中的角色。将另一种语言编译为 dalvik 操作码从而绕过对 jdk 的需求也是可能的。

大概是移植 NDK gcc & binutils 与 android 打包程序一起是可能的,这可以提供最新 android 版本的官方“本机活动”选项,或者一些自定义解决方案,其中 java 部分是预先生成的包装器,并且只为该程序编写本机代码在常规应用程序开发过程中必须更改的有趣部分。

最后,我们距离理论上可以在最先进的 ARM 系统上模拟“较旧”的 x86 系统已经不远了; x86 jdk 可能可以在这样的虚拟环境中运行,尽管效率很低。


自从编写此答案以来,在设备本身上进行 Android Java-> Dalvik 开发的解决方案已经可用。由于这些至少可以在基于 ARM 的 Android 设备上运行,因此可以视为在“基于 ARM 的计算机”上为 Android 进行开发。据推测,相同的想法可以应用于基于 ARM 的上网本或“chromebook”类型的系统。

This depends to some degree on what you mean by "to develop for android".

There are a number of scripting tools and frameworks which can be used to create applications on android, without actually compiling any java code. Some of these are intended even for development on the android device itself.

In terms of traditional SDK apps, most of the android toolchain is open source and potentially build-able for any posix-ish platform. The problem is the java jdk - you would need to obtain something to fill that role in the toolchain which would run on your ARM system. Something which compiles another language to dalvik opcodes and thus bypasses the need for the jdk could also be a possibility.

Presumably porting the NDK gcc & binutils along with the android packager is possible, which could make available either the official "native activity" option of more recent android releases, or some custom solution in which the java portion is a pre-generated wrapper and only native code is written for the interesting parts that would have to change during routine app development.

Finally, we aren't far from the point where it would theoretically be possible to emulate an "older" x86 system on a cutting-edge ARM one; potentially the x86 jdk could be run in such a virtual environment, albeit inefficiently.


Since this answer was written, solutions for doing Android Java->Dalvik development on the device itself have become available. As these work at least on ARM-based Android devices, that would qualify as developing for Android on an "ARM based computer". Presumably the same ideas could be applied to an ARM-based netbook or "chromebook" type of system.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文