Closed GoogleCodeExporter closed 9 years ago
I was able to build a large project -- containing for example bsh.jar -- on the
emulator using JavaIDE with the Dalvik heap limit raised to 64 Mb (from the
default 16 or 24). A root user might be able to effect this change on the real
device.
Original comment by JeffreyR...@gmail.com
on 9 Nov 2011 at 8:14
I have a report from a user who has been able to augment the VM heap with
BladeBuddy. After this, the dx out-of-memory exception did not occur any more
for his project.
Unfortunately, this only works if you have root access.
Tom
Original comment by tom.ar...@gmail.com
on 16 Jan 2012 at 10:06
Is there anyone who can modify the dx code, so that it uses less memory?
From what I've seen, dx makes all its work in memory.
In com\android\dx\command\dexer\Main.writeDex() the data is all written to a
byte[] and then written to the OutputStream. Maybe, we could write the data in
smaller chunks and thus, save memory?
Tom
Original comment by tom.ar...@gmail.com
on 16 Jan 2012 at 10:22
In case useful, I can confirm the BladeBuddy report worked for me too.
(FYI: SGS2 150mm heap (up from 64mb) topped out at 115mb dexing of 396kb source
and 1269kb of compressed JAR'd libraries in 103 seconds.) I'm still
geeking-out that this works -- including native library & RoboGuice. thanks!
Original comment by Rupert....@gmail.com
on 8 Feb 2012 at 9:07
I am working on a new app called LibMinimizer.
It will allow to shrink the external Java libraries to their minimum and thus
not solve but at least alleviate the problem.
Original comment by tom.ar...@gmail.com
on 28 Mar 2012 at 6:14
This problem is now solved with the new PRO version 1.6.0
It contains the DexMerger tool which can merge 2 dex files and the included dx
is able to merge several dex archives (.dex.zip)
If a certain jar library is too large to dexify on the Android device, then
dexify it on your PC and copy the dex archive to your device.
See the 1.6.0 help file for more details.
Tom
Original comment by tom.ar...@gmail.com
on 11 Oct 2012 at 10:20
Original issue reported on code.google.com by
tom.ar...@gmail.com
on 31 Oct 2011 at 6:46