I have an android application that only has one jar import which is 4 mb in size (Symja https://code.google.com/p/symja/) Literally the only code in the project is creating a new textview and setting it as the content view. But I am getting the error(s):
Conversion to Dalvik format failed: Unable to execute dex: Java heap space
Unable to execute dex: Java heap space
I have another android project which is alot bigger, almost 20,000 lines of code and it runs in seconds. My eclipse.ini has the following settings:
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m
I do not know why I cannot run this project. So any suggestions are greatly appreciated!
Thanks.
Temporary fix – Increase the heap size On the Eclipse menu, clicks Run -> Run Configurations.. , select the Java application we want to run, click on the Arguments tab, VM arguments section, and adjust a better Java initial maximum heap size.
Since Eclipse is a Java program, you can increase the heap size of Eclipse by using JVM memory options -Xms and -Xmx. There are two ways to provide JVM options to eclipse either updating the Eclipse shortcut or adding -vmargs on eclipse. ini file.
Try the following:
Right click your project. Go to Properties -> Java Build Path -> Order and Export.
Uncheck the check box against your included library. Press OK and run the project.
On doing this Eclipse will take only the classes which are needed in the code, from the jar instead of storing all the classes from the jar.
I read, that symja library needs Java version 1.6. But your Eclipse uses Java 1.5. Maybe, it's a problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With