如何采用Android生成的Ant生成文件时,指定lib文件夹的JAR文件? [英] How to specify lib folder for JARs when using Android-generated ant build file?

查看:232
本文介绍了如何采用Android生成的Ant生成文件时,指定lib文件夹的JAR文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用已经由机器人产生一个Ant构建文件林。我们的Andr​​oid应用程序需要住我们的项目的lib文件夹内的一个JAR文件,所以我需要的时候它生成的东西来调整蚂蚁正在使用的类路径。

当我运行:

 蚂蚁-lib LIB调试
 

生成项目就好了,但是这确实应该是构建文件本身中。是Android上构建文件生成引用android_rules.xml所以很多这方面的东西是自动的。我想我的问题,随着Android版本的规则行事时,什么是最好的做法吗?

解决方案
  

我们的Andr​​oid应用程序需要的JAR   文件住的lib文件夹中   我们的项目

把它放在库/ 文件夹,一切都将自动运行。我不知道你的应用程序什么可能要求的lib / 目录中,而不是库/

Im using an ant build file that has been generated by android. Our Android application requires a JAR file that lives inside the lib folder of our project, so I need to adjust the classpath that ant is using when it builds stuff.

When I run:

ant -lib lib debug

the project builds just fine, but this should really be inside the build file itself. The build file that android generates references the android_rules.xml so a lot of this stuff is automated. I guess my question, what the best practice here when working with the Android build rules ?

解决方案

Our Android application requires a JAR file that lives inside the lib folder of our project

Put it in the libs/ folder, and everything will work automatically. I do not know what in your application could possibly require the lib/ directory instead of libs/.

这篇关于如何采用Android生成的Ant生成文件时,指定lib文件夹的JAR文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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