在Eclipse管理项目的依赖

在Eclipse管理项目的依赖

问题描述:

我看到了一些关于这个职位,但我仍然在努力。

I see a number of posts on this, but I'm still struggling.

我有两个项目,一个具有robotium库和一个使用它(我们将其命名为富)工作区。我想点击foo的运行,并将其重新编译robotium成一个罐子,把它添加到Foo的构建路径,然后运行foo的。我怎样才能做到这一点?

I've got a workspace with two projects, one with the robotium library and one using it(we'll call this one foo). I would like to click run on foo, and have it re-compile robotium into a jar, add it to foo's build path, and then run foo. How can I do this?

另外,我也开始学习Maven的,所以我不反对这样做的方式,我只是不知道如何 - 我一直在假设这是Eclipse的事情可以做独立的。

Also, I'm starting to learn maven so I'm not opposed to doing this that way, I just don't know how -- I've been assuming this is something Eclipse can do standalone.

您还可以设置一个Android项目作为库,并在富项目引用该库。

You can also set an android project as a library, and in the foo project reference to that library.

project properties -> android -> libraries -> add project in workspace

在这种方式你可以更改您的robotium项目,并在运行富项目将编译和链接库项目,这也被用来在公共库项目等分开。

In that way you can have your robotium project with your changes and when you run the foo project it will compile and link the library project, this is also used to separate your project in common libraries, etc.

您将需要Robotium项目工作空间中的:)

You will need the Robotium project in your workspace :)