如何使用eclipse adt将新的库添加到android依赖项? [英] How do I add a new library to android dependencies using eclipse adt?

查看:634
本文介绍了如何使用eclipse adt将新的库添加到android依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用eclipse adt将外部库添加到Android依赖关系中。我有几个图书馆,如拉扯刷新等。但是每次我添加一个新的库jar文件,它显示在android依赖库文件夹之外。如何使其与其他库耦合作为Android依赖库的一部分。这是我迄今为止所做的:
项目>属性> java构建路径>库>添加jars(也尝试添加外部jar),但它始终显示我的新jar文件独立,我希望它成为android的一部分依赖关系)。任何线索?
这是一个屏幕截图,我想将其添加为Android依赖关系的一部分:



解决方案

我还是不明白为什么对你很重要但是,当您引用库项目时,右键单击项目 - >属性 - > Android->添加然后jar进入Android依赖关系。



如果您直接将该jar直接添加到您的项目中的libs或使用构建路径,那么它属于Android私有库。



两种方法都有效,但如果要在开发过程中更改库的代码,则可以引用库项目。


I am trying to add external library to android dependancies using eclipse adt. I have a couple of libraries like pull to refresh etc in there. But everytime I add a new library jar file it shows outside of the android dependancies library folder. How do I make it such that it is coupled with the other libraries as a part of android dependancies library. Here's what I did so far: Project> Properties> java build path > libraries> add jars ( also tried adding external jars), but it always showed my new jar file independantly, i want it to be a part of android dependancies). any clue? Here's a screen shot, I would like to add it as a part of android dependencies:

解决方案

I still do not get why that is important to you.

However, when you reference a library project: rightclick project->properties->Android->Add then the jar goes into Android Dependencies.

If you add the jar directly to your project under libs or using build path, then it goes under Android Private Libraries.

Both methods works but referencing a library project can have benefits if you want to alter the code of the library during development.

这篇关于如何使用eclipse adt将新的库添加到android依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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