For the original poster, your eclipse is 1.2.1? That seems wrong.. the
latest is 3.5 or later. I am assuming you got that version from the about
box or something and perhaps it doesn't show the actually IDE version.

Anyway, the way I do this.. quite honestly.. is to NOT depend on the IDE. I
instead use my ant build files to handle dependencies. There are several
ways you could do this, from using Ant + Ivy, Maven2, or if it's as simple
as one project using only one other project, have an ant task in the first
project that can "drop" the built .jar file into the 2nd projects /lib path.
You build the first project... first... which will deposit the .jar with the
class(es) you need into the path of the second project. My task may be
something like:

<copy toDir="../secondProject/lib" file="dist/myjar.jar"/>

(Forgive me if that is the wrong ant task.. it's been a while since I did
this from memory). Now, after you build the first project, you go into the
2nd project properties, and add the <second project>/lib/*.jar files to the
classpath. Since you built the first project, it will see the .jar that
project copied over to the second projects lib/ folder. Now.. if you try to
add the jar WITHOUT building the project first.. it won't work...which is
why you manually build the first project. The down side to this approach is
that if you work on both projects frequently, you have to build the first,
then the 2nd. If however the first is more a library, that you update from
time to time, and the 2nd is the one you are working on daily, it's not too
big a deal.

An alternative you can do.. is using the 2nd projects properties, you can
add the jar file directly from the first project as part of the 2nd projects
classpath. I think there is an option that links the first project as a
dependency and will then build it for you when you build the 2nd project.
HOWEVER, this will only work via the Eclipse build process. IF you use Ant
like I do, so that I can free myself of IDE specific dependencies and use a
nightly build process on a linux server to build my projects, you'll
probably want to stick with doing it all in the ant build.xml file.

A third option is to have a master build script that you can then call out
to each ant task of each project to build them in the order you want. You
basically write a single main build.xml that makes <antcall> calls to
specific projects build.xml files. You can even layer in the copying of the
built jars and such from one project to another and so forth. This is manual
management of dependencies, but again if you're using small projects, to me
I like the control over it and it's really not that much work to do.



On Sat, Jan 2, 2010 at 7:18 PM, Coco <[email protected]> wrote:

> I have the same problem too. Seems that the emulator is not being
> given the class path to any referenced projects that the compiler
> clearly knows about. I'd love a solution too.
>
> -Melinda
>
> On Dec 30 2009, 3:03 am, CosminB <[email protected]> wrote:
> > Hi,
> >
> > I'm having the same problem. Did you find a solution to this yet?
> >
> > Thanks,
> > Cosmin
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> [email protected]<android-beginners%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to