I'm not clear on what needs to be declared in the manifest file for a 
library project. On the one hand, the documentation for setting up a 
library project in 
Eclipse<http://developer.android.com/tools/projects/projects-eclipse.html#SettingUpLibraryProject>says:

A library project's manifest file must declare all of the shared components 
> that it includes, just as would a standard Android application.


On the other hand, the TicTacToeLib sample application doesn't declare its 
(single) activity, even though that activity is then used in the 
TicTacToeMain sample project. The sample project seems to be consistent 
with what it says later in the documentation:

In the manifest file of the application project, you must add declarations 
> of all components that the application will use that are imported from a 
> library project.


I've experimented with this with my own library project and it seems that 
the build process ignores any component declarations in the library 
manifest. The only thing that seems to be needed in the library is the 
<manifest> tag itself (with a package name attribute). No other tags seem 
to be required, including <application> or <uses-sdk>. The build process 
seems to work equally well and the resulting .apk files seem to be the same 
regardless of what activities (if any) are declared in the library manifest.

It would also seem a poorly designed build process to require declaring the 
same components in two different places. Is the documentation just wrong, 
or do we really need to declare components once in the library project and 
again in the main project? (Perhaps there's some future build functionality 
that this would support?) If the documentation is wrong, is the minimum 
declaration really just the <manifest> tag?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to