Android dx generates bad checksum dex files
<p>I'm working on a project which generates Java code on-the-fly, and compiles it for Android. Funny thing is that sometimes <strong>dx.bat</strong> generates a broken DEX file while finishing successfully.</p>

<p>When I try to dexdump the DEX, I get: <strong>ERROR: bad checksum (deadbeef vs deadc0de)</strong></p>

<p>Manually playing around with <em>--no-optimize</em> or <em>--no-locals</em> will solve the issue for this specific compilation. But you can never know what will happen with the next one and this is a process that should be reliable.</p>

<p>BTW, manually fixing the checksum doesn't fix the problem (dexdump will crash after dumping some data) so I figure it isn't a dx checksum calculation bug.</p>

<p>Is there a known issue? How can I further debug?</p>

<p>Thanks!</p>
