如何使用 ant 构建带有外部库的 android 应用程序? [英] How to build an android app with external libraries using ant?

查看:24
本文介绍了如何使用 ant 构建带有外部库的 android 应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用我的 IDE 构建良好的现有项目.我想使用android 更新" 命令来为这个项目生成一个 ant 构建文件.

I have an existing project that builds fine using my IDE. I'd like to use the "android update" command to generate an ant buildfile for this project.

构建文件生成正常,但构建失败,因为它没有使用我的 libs 目录中的一些 jarfile 构建.

The buildfile is generated fine, but the build fails because it's not building with some jarfiles I have in my libs directory.

我想找出告诉 ant 在我的 libs 目录中使用一些外部 jar 文件进行构建的正确方法.我该怎么做?它是 build.properties 中的属性吗?我需要以某种方式修改 build.xml 吗?还是有完全不同的解决方案?

I'd like to figure out the proper way to tell ant to build with some external jar files in my libs directory. How should I do this? Is it a property in build.properties? Do I need to modify build.xml somehow? Or is there a different solution entirely?

推荐答案

但构建失败,因为它不是用我有的一些 jarfile 构建我的 libs 目录.

but the build fails because it's not building with some jarfiles I have in my libs directory.

你的错误信息是……什么?我怀疑您可能误解了错误消息.

And your error message is...what? I suspect you may be misinterpreting the error message.

我想找出正确的方法告诉蚂蚁用一些东西建造我的库中的外部 jar 文件目录.我该怎么做?

I'd like to figure out the proper way to tell ant to build with some external jar files in my libs directory. How should I do this?

只需将它们放在 libs/ 中,因为 Ant 会将其中的所有内容添加到您的构建路径中.参见这个项目这个项目,以及这个项目 示例.

Just put them in libs/, as Ant will add everything in there to your build path. See this project, and this project, and this project for examples.

这篇关于如何使用 ant 构建带有外部库的 android 应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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