Reputation: 1485
My problem statement being, there is a android project x and my project y. i want to add some classes from my project and some resource files to add as a jar in project x. Basically i do not want the creater of project x to write or add anything else except my jar.
I want to keep a different "Myres" folder in this included jar. This Myres folder is similar to the "res" folder in an Android application. And have "Myres" folder to be built same as the res folder and get the generated java class , the R.java class that has resources both from res and Myres folder.
Last option that i see is write some piece of runnable code that will directly place the resources files from my jar to the project x res folder(and is this one possible).
please note that there will not be any name clashes between the files.
Upvotes: 0
Views: 343
Reputation: 4658
You'll need to create a library project. If you don't want to provide the source code, you can build a jar file and include that in your library project.
There's no other easy way to include the \res files outside of a library or copying them into the second app. They can't be included in a jar afaik.
Some details on libraries http://developer.android.com/guide/developing/projects/projects-eclipse.html
Upvotes: 1