添加引用罐子到Android的build.xml [英] Adding referenced jars to android build.xml

查看:113
本文介绍了添加引用罐子到Android的build.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Android的Eclipse项目,并已通过做所产生的相应的build.xml Ant文件:

I have an android eclipse project and have generated the corresponding build.xml ant file by doing:

android update test-project -p . -m ..\main_project

该编译罚款。然而,在日食我已再增加了三个引用的外部罐(EasyMock的,objenesis和CGLIB)。在Eclipse中建立一切正常,但后来当我再次运行上面的命令,它不添加这些罐子到类路径。

This compiles fine. However, in eclipse I have then added three referenced external jars (easymock, objenesis and cglib). In eclipse everything builds fine but then when I run the above command again it doesn't add these jars to the classpath.

所以我的问题是如何告诉build.xml文件包括这些罐子?

So my question is how to tell the build.xml to include these jars?

我第一次做了一些研究,有些人建议将在SDK本身的规则文件,但是这是我想避免的,然后每个人都在我的球队需要做到这一点,这是不实际的。

I have done some research first and some people suggested changing the rules files in the sdk itself but this is something I want to avoid as then everyone in my team would need to do this and that's not practical.

谢谢 斯蒂芬

推荐答案

有关build.xml文件,你可以在你的一个属性设置属性external.libs.dir文件(如 build.properties 的),默认情况下它指向的库/ 项目的文件夹 - 只需把那里所有的罐子

For build.xml you can set property "external.libs.dir" in one of your properties file( like build.properties), by default it points to libs/ folder of your project - simply put there all your jars

external.libs.dir=<your_custom_path>/lib

这篇关于添加引用罐子到Android的build.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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