nithinreddy
nithinreddy

Reputation: 6197

Applications manifest and librarys manifest in Android

I'm developing an application, with another project as my library.

What properties are merged in the manifest files?

Example - If the permissions are already specified in the Library's manifest file, do they need to be specified again in the applications manifest?

Also, if there is a service in the Library project, do I need to specify again manually in the Applications manifest too (additional to library's manifest).

Thanks

Upvotes: 3

Views: 162

Answers (1)

pixelearth
pixelearth

Reputation: 14630

There is a section of this page: http://developer.android.com/tools/projects/projects-eclipse.html#SettingUpLibraryProject that says you must (re)declare all of the bits of the library project that your application will be using in the manifest file.

Declaring library components in the manifest file

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. For example, you must declare activity, service, receiver, provider, and so on, as well as permission, uses-library, and similar elements.

Declarations should reference the library components by their fully-qualified package names, where appropriate.

Personally, this seems redundant, but it may be because the app doesn't need to use all of the components of the library project, and the app shouldn't assume it will.

Upvotes: 2

Related Questions