在实际手机上编译 android 应用程序 [英] Compiling android apps on an actual phone

查看:27
本文介绍了在实际手机上编译 android 应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何在 android 平台上编译应用程序源代码?我知道这是可能的,因为我看到一些应用程序正在这样做......谢谢!

Hi I'd like to know how to compile an app source code on an android platform? I know it's possible because I saw some apps that are doing it... Thanx ahead!

推荐答案

我认为您要求的是一种在 android 设备上编译 android 应用程序的方法.

I think what you are asking for is a way to compile android apps on an android device.

像这样的应用新 IDE 的表现.

the way an app like this new IDE does.

如果是这样,您需要做的是采用开源 Java 编译器,例如 ejc(Eclipse 中使用的 Java 编译器)并使用它来编译您的 Java 源代码.然后,您需要移植 dalvik 编译器才能运行,以便从 java 编译器生成的类文件生成 dex.

If so what you would need to do is to take an open source java compiler such as the ejc (the Java compiler used within Eclipse) and use it to compile your java source. You would then need to port the dalvik compiler to be able to run, in order to generate dex from the class files generated by the java compiler.

对 AIDE 开发人员的采访提供了更多关于他们如何做到的信息.

An interview with he developers of AIDE has a little bit more info on how they did it.

更新:

实际上我刚刚遇到了一个 开源项目,它提供了类似的功能,但基于使用 vim 和现有的 SDK cli工具移植到安卓设备上运行.该项目托管在此处.

Actually I just came across an open source project which provides similar functionality but based on using vim and the existing SDK cli tools ported to run on a an android device. The project is hosted here.

更新 2:

我还发现了另一个开源项目,它也可以在我认为的设备编译/构建上执行应该为您提供您正在尝试做什么的示例...

I found yet another open source project that also does on device compile/build which I think should provide you with examples of what you are trying to do...

更具体地说,如果您查看 IDE.java,可以看到各个工具(ejc、dx、aapt)是如何调用/使用的.

More specifically, if you look in IDE.java, you can see how the individual tools (ejc, dx, aapt) are called/used.

这篇关于在实际手机上编译 android 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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