I'm using Eclipse and I have a new project using android version 21 (5.0). I want to compile it using Art instead of Dalvik. What I have to do to achieve that?
Edit : The reason of the question is that I have this problem:
[2014-11-12 10:30:49 - Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536
[2014-11-12 10:30:49 - MAMUT] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536
I expected than doing that I solve the problem:
Of particular note is the suggestion of making a minSdkVersion 21 dev build - this allows you to generate multi-dex output incrementally in the new ART format, making for a much faster development iteration cycle (at least on Android 5.0 devices).
Thanks
That's wrong and should read roughly
The problem of the
dex
format is that it can't contain more than 65536 methods. The solution is to simpliy split the output into multipledex
files. There are 2 problems we had in the pastdx
tool was not capable to produce multiple dex filesBuild tools 21 solve the first problem, you can simply generate multiple dex files by just adding the
-multi-dex
flag to the compile options.The multidex support library solves the second problem. It tells those devices how to load additional dex files. And the ART runtime on Lollipop and above (4.4 had ART too but can't do the same) is capable of using multiple files without being told how to do so.
Also relevant is the official Building Apps with Over 65K Methods document.