How to solve java.lang.OutOfMemoryError when compiling Appcelerator Android app?
<p>I try to compile apk using Appcelerator but i get this error. How to solve it. </p>

<p>Currently I'm using Titanium sdk: 5.2.0.GA</p>

<pre><code>    &gt;Error:
    &gt;ERROR :  Failed to run dexer:
    &gt;ERROR :  UNEXPECTED TOP-LEVEL ERROR:
    &gt;ERROR :  java.lang.OutOfMemoryError: Java heap space
</code></pre>

<p>Other error</p>

<blockquote>
  <p>[ERROR] :  Failed to run dexer:
  [ERROR] :<br>
  [ERROR] :  UNEXPECTED TOP-LEVEL ERROR:
  [ERROR] :  java.lang.OutOfMemoryError: Java heap space
  [ERROR] :      at java.util.Arrays.copyOf(Arrays.java:2271)
  [ERROR] :      at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:191)
  [ERROR] :      at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:279)
  [ERROR] :      at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
  [ERROR] :      at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
  [ERROR] :      at com.android.dx.command.dexer.Main.processOne(Main.java:672)
  [ERROR] :      at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
  [ERROR] :      at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
  [ERROR] :      at com.android.dx.command.dexer.Main.run(Main.java:277)
  [ERROR] :      at com.android.dx.command.dexer.Main.main(Main.java:245)
  [ERROR] :      at com.android.dx.command.Main.main(Main.java:106)</p>
</blockquote>

<p>Hi again,
I get the solution from the link and the code is :</p>

<blockquote>
<pre><code>   &lt;property name="android.javac.maxmemory" type="string"&gt;1024M&lt;/property&gt;
   &lt;property name="android.dx.maxmemory" type="string"&gt;2048M&lt;/property&gt;
</code></pre>
</blockquote>

<p>Thanks</p>