hannes
hannes

Reputation: 537

How to import an existing android Project into another android project

i want to import an existing Android Project(a small App that should be added to another Android Project soon) into another Android Project in order to test.
I tried several things for example:

but nothing worked and i did not forget to mark the checkbox at "order and Export" i'll be very happy, if anyone could help me ;)

hannes

Upvotes: 2

Views: 9852

Answers (2)

aruwen
aruwen

Reputation: 212

there are a couple of different solutions imo.

If applicable - you could mark the first small project as a library and just add it to the newer project (properties -> android -> checkbox/add lib)

OR

You access the app if its already installed on the device

OR

You copy the source code/package to the new project

OR

You compile the old project to a dex file and load the classes/methods via the DexClassLoader

OR

export as JAR file, as you already tried - but you cant export any resources (although there are workarounds if there arent many resources)

Thats all I can think of right now, if you have more specific question to one of the solutions, just ask =)

Upvotes: 3

PedroAGSantos
PedroAGSantos

Reputation: 2346

Right click on your project Build Path>Configure Build Path> "Select prject tab" then add the project :D

Hope it helps Have fun

Upvotes: 3

Related Questions