On Wed, May 26, 2010 at 3:16 AM, Mark Carter <[email protected]> wrote:
> I guess you've probably looked into this already, but is there any way
> to make this work by adding the Android project to the build path (as
> opposed to making it a library project and then adding it as a
> library)?
>
> From a developer's perspective this would be more intuitive because
> projects would be referencing java projects and android projects in
> the same way. This would stop the problems regarding code apparently
> existing in two locations. As for the resources, couldn't your pre
> compiler handle that?

We can' really do that because the Eclipse compiler doesn't handle
those projects at the source level, and instead use the output of
those projects (the generated .class files) to compile the current
project. What we need is the main project to compile the source of the
library projects, which is why we used the linked source folder.

I think it's actually useful to have it be different than referencing
Java project because the behavior is really different.

> For a shared Android project, the R class would be generated in the
> same way as before. For an Android project referencing shared Android
> projects, the R class would also include all the aggregated resources.

The problem is not so much generating the R class, it's making sure
the library project is compiled with this "composite" R class made of
all the projects (main + libs).

> If there is a way to make this work, it would be ideal, because it
> also supports deep nesting of Android projects.

Library projects depending on other Library projects is not impossible
with the current system. It's just that there are a few things to
figure out first. We'll add support for it soon hopefully.

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 [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