1

I would like to create a java app that actually programaticlly compiles a differnt android project - Meaning i'd like to create .apk files by code. How would i go about this??? Is this feasible?

Thanks

asked Nov 21, 2011 at 21:37
2
  • If you want it to run on the Android device, I'd say it's not feasible. If you want it to run on a workstation (i.e., replicate Dalvik) it's feasible but why would you need it? Commented Nov 21, 2011 at 21:42
  • No no, i mean compile a custom android package from a java "console application", Not on an android device. Commented Nov 22, 2011 at 6:52

1 Answer 1

2

Sure, it could be done. If there is a way to build an Android project by command line, you can make those calls with Java I'm sure. See this and this link for information on building Android programs from the command line. From there, its simply invoking the correct commands in Java, maybe using Runtime.exec().

This will require a good understanding of the build process, and will most likely get very cumbersome. So an answer to your question as to whether or not it is feasible: no, it would be difficult.

You could use Ant to automate your build process.

Bruno Bieri
10.3k11 gold badges67 silver badges98 bronze badges
answered Nov 21, 2011 at 22:34
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.