使用 ADT 的“构建性能改进”对于蚂蚁
以下是 ADT 最新变更日志的摘录:
构建性能改进。
除了支持新类型的库项目以及上面提到的构建改进(aapt 和 png crunch 缓存)之外,Ant 中的重大变化是新的 Ant 构建最终在执行任何操作之前正确支持依赖项检查。这意味着,虽然某些步骤(aapt、dex)仍然不是增量的,但如果不需要,它们至少不会运行。在r13及之前,aidl编译、资源ID生成、dex'ing、打包等即使没有文件更改,也会一直发生。
然而,在更新了所有内容之后,在使用 ant 编译我的项目时,我没有看到任何性能提升。每次 ant 调试安装时,仍会从头开始构建未修改的项目。
我应该在某处激活这些优化吗?或者我没有使用正确的 ant 命令?
Here's an exerpt from the ADT's latest changelog:
Build performance improvements.
The big changes in Ant, besides supporting the new type of library projects, and the build improvements mentioned above (aapt and png crunch cache) is that the new Ant build finally properly supports dependency check before doing any actions. This means that, while some steps (aapt, dex) are still not incremental, they, at least, won’t run if they don’t need to. In r13 and before, aidl compilation, resources ID generation, dex’ing, packaging, etc.. would happen all the time even if no file changed.
However after having updated everything I don't see any performance boost when compiling my projects with ant. Unmodified projects are still built from scratch every ant debug install.
Should I activate these optimizations somewhere? or am I not using the right ant command?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除了使用类似更新后的内容更新 build.xml 之外,不需要激活,
您应该会在构建日志中看到这些行
如果您看到它,那么您正在使用最新 sdk-tools 中提到的优化。
No activation is needed other than updating your build.xml with something like
After updating you should see the lines in your build log
If you see it, then you are using mentioned optimizations from latest sdk-tools.