使用Ant构建的Android示例项目 [英] Building Android sample project using Ant
问题描述
我相信我已经遵循了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.
推荐答案
您需要执行以下命令:
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示例项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!