Reputation: 4946
I am turning an project that I have been working on for while into a library project and I would like to know what can be left out of that project.
The library is only source code (no images or UI). What can be left out of the ManiFest.xml file, and can I safely remove all the drawable, values, layout, and layout folders? I know I will no be using those resources, and strings resources will be handled by the referencing project.
Upvotes: 1
Views: 123
Reputation: 41126
I started working with Android Library Project since r12, If I were you, I would highly consider waiting a little bit longer (until r17 release).
Android dev team started revamp the whole Library Project design during several recent release (probably since r14), and promise us a ultimate solution in next coming release. check out this blog for details. This leaves our continuous development in an extremely unstable stage at the moment, there are already numbers of threads posted on the internet, for example, this one complain about the compatibly with legacy Library Project, regardless of whether you use Ant, Maven or purely ADT manage your Library Project. From my own experience, I use Maven manage my Android Project, each time I upgrade my SDK since r14, Library Project is always the trouble maker. I would expect another tough landing when upgrade to r17, hopefully the last time.
If you insist, these are some development considerations you may need aware.
Hope this helps.
Upvotes: 1
Reputation: 8072
You can remove anything that is not directly referenced by your library project. It just has to be a viable Android project that compiles.
Pretty sure you can have a bare bones manifest file too. Since you cannot run a library project and you have to copy the anything that would be declared (e.g. activities, permissions, services, content providers etc) into the manifest that uses your library project anyway.
Upvotes: 1