问题
I now this question has pop-ed up a lot but I couldn't find a real solution. The aapt takes too much time compressing images and that is waste of time for large projects. It will take ages if you change something in the *.xml file.
Any solution to add the -0 optimization option to the Eclipse build?
Thanks a lot.
回答1:
There is no way to pass parameters to aapt from eclipse (at least I'm not aware about it).
But there is another solution to your problem, you can use new feature introduced in ADT12: Finer Control Over ADT Build Process. This will not speed up compilation, but will minimize number of re-compilation of resources after resource edits.
As another solution, you can create proxy script/program that substitutes aapt
and calls original aapt
executable with one extra parameter -0
. This will actually allow for much finer control over how eclipse uses aapt
, but may influence build of other projects.
来源:https://stackoverflow.com/questions/6815589/how-to-add-0-option-to-aapt-in-eclipse