On Sat, May 22, 2010 at 2:49 AM, Mark Carter <m...@carter.name> wrote:
> Great to see the new Android Library Project feature in ADT 0.9.7.
>
> http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
>
> However, some things aren't clear to me yet:
>
> 1. In the library project, what does versionCode, versionName,
> packageName now mean? I assume nothing???

Yes, nothing.

The manifest for the library is not used besides looking at the
package name for the library.

> 2. The docs state that activities, services etc need to be declared in
> the library project and also the app project. So doesn't this just
> result in a load of duplication? What if the activity is declared
> slightly differently in one to the other?

They actually don't need to be declared in the library (yet).
We only recommend you put them in the library manifest as a reference
so that you can easily copy-paste them into the app projects that
reference them.
(In the future we will automatically merge the library manifests into
the app manifests).

> 3. It would have been incredibly useful to allow library projects to
> reference each other. I'm curious as to why this is not possible...

It was mainly that we didn't have time.
We need to figure out the order of the resources (as you may already
have read, the priority order is important as resources could override
each other).
The question is what happens when a project depends on libraries A & B
which both depend on library C. What's the library priority order? A,
B, C or A, C, B?

> 4. If an app references both resources and code in a library project,
> then that library project needs to be added as both a library and a
> project in the app's build path (in eclipse at least) - why is this?

hmm no you should not have too.
Adding the library as a project dependence (in project properties
under Android) should bring the source code of the library into the
main project.

> 5. I'm considering subclassing library project activities/services in
> my app project. Is there any reason not to do this?

Since the library project is compiled inside the app project, there's
no reason this won't work.

Xav

-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

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

Reply via email to