问题
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:
- export the first project als jar and add the external jar to build path of the second
- added the first project to the second in the build path of the second project
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
回答1:
Right click on your project Build Path>Configure Build Path> "Select prject tab" then add the project :D
Hope it helps Have fun
回答2:
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 =)
来源:https://stackoverflow.com/questions/7346448/how-to-import-an-existing-android-project-into-another-android-project