1

How can I create a new project from an existing project, using Android command line tools?

android update project ... ?

Why i want to implement this kind of process: I would like to create a batch file to generate a new project from an existing one, then build the apk from that newly created project, using Ant. This whole process needs to be working without Eclipse or any other IDE.

Thanks!

Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
Kalman Speier
  • 1,937
  • 13
  • 18
  • Why you want to create a new project using existing by using command line if there is already a facility to create in same way in eclipse? – Paresh Mayani Oct 11 '11 at 06:23
  • Because I would like to create a batch file to generate a new project from an existing one, then build the apk from that newly created project, using Ant. This whole process needs to be working without Eclipse or any other IDE. – Kalman Speier Oct 11 '11 at 06:34

1 Answers1

2

How can I create a new project from an existing project, using Android command line tools?

Copy the directory tree of the old project into a new project.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Yep, finally I came up with a similar solution. Copying files and folders. Not the best, but I am afraid the `android` tool isn't support this scenario. – Kalman Speier Oct 11 '11 at 14:25
  • @Kalman Speier: "Not the best" -- ummm... what precisely are you expecting to happen? If your issue is "well, I want different package names" or something like that, you probably should be using an Android library project for the non-templated stuff, instead of making N copies of that code. – CommonsWare Oct 11 '11 at 14:29
  • The current process looks like this: copying the base template project to a temp folder, making all the necessary changes on that temp project then build the apk, finally delete from temp. Anyway it's working and should be ok for now. But I will consider using a library project, good idea, thanks. – Kalman Speier Oct 12 '11 at 11:43