在 Android Studio 上进行 Ant 构建 [英] Doing an Ant Build on Android Studio

查看:22
本文介绍了在 Android Studio 上进行 Ant 构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android Studio 是否支持 Ant 构建?

Does Android Studio support Ant builds?

我想运行一个编译前的 Ant 目标.

I want to run a before-compilation Ant target.

Android Studio 是新的,所以它似乎不支持 Gradle.

Android Studio is new, so it seems possible it's not supported in favor of Gradle.

推荐答案

所以看来 Studio 并不打算完全支持 Ant 构建(见评论)

So it seems that Studio isn't meant to fully support Ant builds (see comments)

直到现在它对我来说都很好,但我想有一些特定的配置,如果它不能正常工作.

It worked fine for me until now, but I suppose there are specific configuration were it won't work as well.

InteliJ IDEA 13 EAP 具有 Studio 的所有功能并支持 Ant.

我还想指出 Gradle 也支持预构建任务,因此您可能需要考虑切换到 Gradle.

I would also like to point out that Gradle also support pre-build tasks, so you might want to consider switching to Gradle.

对于那些会做出选择的人,您可以从 Eclipse 项目生成 Gradle 构建 (注意:我还没有测试过它,但您应该花不到几分钟的时间来试用它,看看它是否适用于您的项目).

For those who will go will make that choice, you can generate a Gradle buil from your Eclipse project (Note : I haven't tested it, but it should take you less than minutes to try it out and see if it works for your project).

[原回复]

Android Studio 明确支持 Ant 构建.我一直在我公司的项目中使用它,效果很好.

Android Studio definitively supports Ant builds. I have been using it on my company's project and it works fine.

但它强烈推荐 Gradle 是对的,使它成为所有使用 Android Studio 创建的新项目的默认编译器(但您实际上可以切换回 Ant).

But you are right that it strongly recommend Gradle, making it the default compiler for all new project created with Android Studio (but you could actually switch back to Ant).

最后,正如 JoeHz 所指出的,Android Studio 是基于 IntelliJ 的开源版本,所以你也可以去下载这个版本(目前比 Android Studio 稳定得多).

Finally, as JoeHz pointed out, Android Studio is based on the open source version of IntelliJ, so you can also go download this version (which is currently much more stable than Android Studio).

这篇关于在 Android Studio 上进行 Ant 构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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