Compiling Android applications on a real phone

Hi, I would like to know how to compile the source code of the application on the Android platform. I know this is possible because I saw some applications that do this ... Thin ahead!

+6
source share
1 answer

I think what you're asking is a way to compile Android apps on an Android device.

how does an application like this new IDE do .

If so, then you will need to make an open source java compiler such as ejc (the Java compiler used in Eclipse) and use it to compile your java source. Then you will need to port the dalvik compiler to run in order to generate dex from the class files generated by the java compiler.

Interviews when AIDE developers got a bit more information on how they did it.

UPDATE:

Actually, I came across an open source project that provides similar functionality, but based on using vim and existing cli SDK tools ported to work on an Android device. The project is posted here .

UPDATE 2:

I found another open source project that also does compilation / assembly of devices, which I think should provide you with examples of what you are trying to do ...

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

+18
source

Source: https://habr.com/ru/post/910864/


All Articles