如何添加另一个Eclipse项目作为库? [英] How to add another Eclipse project as a library?

查看:820
本文介绍了如何添加另一个Eclipse项目作为库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用这个的PhotoView计划在Eclipse作为库项目。能否请你指导我如何添加这个项目到我的Eclipse,并将其作为库我的另一个项目?

I want to use this PhotoView Project as Library project in eclipse. Can you please guide me How can I add this project into my eclipse and use it as library for my another project ?

推荐答案

以下是一步一步的指令添加一个项目作为库项目到工作区,

Following is step by step instruction for adding a project as Library project into your workspace,

  • 首先,单击Eclipse的文件菜单中,选择导入选项(或者你可以用鼠标右键单击包资源管理器,然后选择导入选项)
  • 这将加载下面的对话框

  • First of all click on Eclipse's file menu and select "Import" option ( or you can right click on Package Explorer and select "Import" option )
  • This will load following dialog

在这里,您可以通过现有项目到工作区或现有的Andr​​oid code到工作区(对于你的要求,你可以选择第二个导入选项)使用任何选项的导入项目

Here you can import project using any of the option either by "Existing Project into Workspace" or by "Existing Android Code into Workspace" ( For your requirement you can choose second import option )

现在右击该项目,并选择属性选项,这将加载下面的对话框

Now right click on that project and select "Properties" option, This will load following dialog

在这里,你可以验证它是否是库项目或没有,如果没有的话勾选上是图书馆为显示在上面的图片复选框。

Here you can verify if it is library project or not, if not then tick on "Is Library" check box as displayed in the above image.

现在点击添加按钮,进入该对话框类似下图

Now click on "Add" button into that dialog box like following image

这将加载像另一个对话框下方

This will load another dialog box like below

此对话框列出了所有你的库项目。

This dialog box lists all the library projects you have.

选择您的库项目,然后点击确定按钮。

Select your library project and click on OK button.

请注意,您的库项目和你的Andr​​oid项目必须在相同的位置,否则Eclipse将不会加载您的库项目,并给你的错误。您可以在下面的图片看,

Note that your library project and your Android Project must be at same location otherwise eclipse will not load your library project and will give you error. You can see in following image,

这篇关于如何添加另一个Eclipse项目作为库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆