如何使用Ant构建Android的样本项目?的build.xml不存在 [英] How to build the Android sample projects using Ant? build.xml does not exist
问题描述
我相信我已经遵循了Android SDK的说明,现在我试图建立样本LunarLander(随机的拾取)
I believe I've followed the instructions in the Android SDK, and I'm now trying to build the sample LunarLander (random one picked)
$ cd samples/android-11/LunarLander
$ ant debug
Buildfile: build.xml does not exist!
Build failed
我相信所有的路径是正确的设置。
我在一个旧的Android SDK发布这样做过,我知道我没有遇到这个错误,所以我pretty困惑,什么是错的。
I believe all PATHs are setup correctly. I've done this before in an older Android SDK release and I know I didn't encounter this error, so I'm pretty confused as to what's wrong.
哦,还有一块信息 - 我只安装了3.0平台包,所以我不知道这是错误或不
Oh, one more piece of info -- I have only installed the 3.0 platform package, so I'm not sure if that is an error or not.
推荐答案
您需要执行下面的命令:
You need to execute this command:
android update project --target <your build target> --path <path to LunarLander example>
这将在例子目录中创建所需的build.xml,那么蚂蚁调试
命令应该工作。
看看<一个href=\"http://developer.android.com/tools/projects/projects-cmdline.html#UpdatingAProject\">here.
*可以使用安卓列表目标
来选择什么样的建设目标,以用于项目。
*You can use android list targets
to choose what build target to use for your project.
这篇关于如何使用Ant构建Android的样本项目?的build.xml不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!