ADT插件会自动创建ant构建文件吗? [英] Does the ADT plugin automatically create an ant build file?
问题描述
几个月前我创建了一个 Android 项目,现在必须使用 Hudson 自动化构建过程.Android 开发指南提到了生成项目时创建的 build.xml 文件 (http://developer.android.com/guide/developing/other-ide.html) 但我在我的项目中没有看到.我必须手动创建它还是可以运行命令来生成它?
I created an Android project a few months ago and now have to automate the build process with Hudson. The Android dev guide mentions a build.xml file that gets created when you generate a project (http://developer.android.com/guide/developing/other-ide.html) but I dont see one in my project. Will I have to create this by hand or can I run a command to generate it?
推荐答案
ADT 插件不生成 Ant 文件.
The ADT plugin doesn't generate an Ant file.
android
命令会在你从命令行通过调用 android create project
创建一个新项目时生成一个 Ant 文件.您可以创建一个示例项目并从该目录复制 build.xml
、build.properties
和 local.properties
文件.
The android
command will generate an Ant file when you create a new project from the command line by calling android create project
. You could create an example project and copy the build.xml
, build.properties
and local.properties
files from that directory.
或者,您可以直接从 $ANDROID_HOME/tools/lib/build.template
复制 build.xml
模板,然后更改项目名称.
Alternatively, you can just copy the build.xml
template directly from $ANDROID_HOME/tools/lib/build.template
then just change the project name.
然后只需创建一个 build.properties
文件 —它是您放置任何 Ant 属性覆盖的地方.
您还需要一个 local.properties
文件,但不要将其检查到源代码管理中 —这是您通过设置 sdk.dir
属性来指定 $ANDROID_HOME
目录的地方.
Then just create a build.properties
file — it's where you place any Ant property overrides.
Also you need a local.properties
file, but don't check that into source control — this is where you specify your $ANDROID_HOME
directory by setting the sdk.dir
property.
这篇关于ADT插件会自动创建ant构建文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!