ant how do I disable pre-dexing r21+

懵懂的女人 提交于 2019-12-10 18:17:28

问题


hello my ant build takes forever with pre-dexing after updating to r21

[dex] Pre-Dexing myproject/android/google-play-services_lib/bin/classes.jar -> classes-27fa775977cf84dcd4ef76d9015649a6.jar

This more than doubles my compile time. Pre-dexing would speed things up if I was only predexing once, but I'm actually reconfiguring my project several times for different ant builds, many times. So they all pre-dex , it is very annoying.

is there a flag I can enable in my ant script?

I've looked at an ant-maven github project but see no way of turning this off, I'm not 100% sure that project is related though.

help?


回答1:


From build.xml , it looks like you can change the property out.dex.input.absolute.dir for all different builds to point to a single directory outside target directory. If the pre-dexed file is present, i guess build system will not try to pre-dex it again.

out.dex.input.absolute.dir

Using maven android plugin ], the post here indicates that predex is turned off by default , though the post is a day old, so maybe you need to get the latest beta version of plugin. You can disable predex by using

    <dexPreDex>false</dexPreDex>


来源:https://stackoverflow.com/questions/14526692/ant-how-do-i-disable-pre-dexing-r21

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!