在 Android SDK 中找不到 ant
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2577578/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't find ant in the Android SDK
提问by StormShadow
I'm working my way through APress's Beginning Android 2 and I've made it all the way to chapter 3, where we build a skeleton app. The book tells me to compile my application by typing "ant" in the command line, but my pc doesn't know what "ant" is yet. I checked in the SDK files and it looks like it wasn't included with the Android SDK. Does anybody know where ant is?
我正在学习 APress 的 Beginning Android 2,并且一直到第 3 章,在那里我们构建了一个骨架应用程序。这本书告诉我通过在命令行中输入“ant”来编译我的应用程序,但我的电脑还不知道“ant”是什么。我检查了 SDK 文件,看起来它没有包含在 Android SDK 中。有人知道蚂蚁在哪里吗?
Thanks
谢谢
回答by Jim Blackler
Ant isn't included with the Android SDK. I suggest you get it from the official site.
Ant 不包含在 Android SDK 中。我建议你从官方网站上获取它。
回答by HariRam
Ant is tool to build projects from commondline and it is different tool. It's not android specific. So if your are using a Debian-based/Ubuntu machine you can install it by
Ant是从commondline构建项目的工具,它是不同的工具。这不是安卓特有的。因此,如果您使用的是基于 Debian/Ubuntu 的机器,您可以通过以下方式安装它
sudo apt-get install ant
回答by Thai Tran
I know it is a bit odd, but even I install brew install ant
and rebuild / re-sync the gradle file, it still doesn't work, so I restarted my Intellij and it started to download the ant1.7
again from maven.
我知道这有点奇怪,但即使我安装brew install ant
并重建/重新同步 gradle 文件,它仍然不起作用,所以我重新启动了我的 Intellij 并开始ant1.7
从 maven 再次下载。