Yesterday, when compiling and running an application (transplanted) written by a colleague of run as Android Application, the system prompts unable to execute DEX: Java heap space. At first, the android SDK was not installed, so I wrote a hello Android program to verify that Hello android can run.
So I googled it. It is said that it was because the ADT was upgraded (like a reply from the android Team). I switched the latest ADT back to the previous one, or I used the android Team (?) The fixed version is enough (I have not tried this ).
In fact, it is also possible to continue using adt14, which requires modifying the eclipse configuration file, as many people on the Internet say, to modify the eclipse. ini file under the eclipse installation directory:
1) Add at the beginning of the file
-VM
D: \ Program Files \ Java \ jre6 \ bin \ javaw.exe
Where, D: \ Program Files \ Java \ jre6 is the path of the JRE on my machine and needs to be modified according to the actual situation
2) search-launcher. xxmaxpermsize and set
256 m
Change
512 m
The parts marked in red may be of different eclipse versions, and the numbers (256) are different.
3) search-vmargs
-Vmargs
-Xms40m
-Xmx384m
Set
-Xms40m
-Xmx384m
Change
-Xms512m
-Xmx1024m
And add
-XX: maxpermsize = 256 m
As shown in the preceding figure, different versions of eclipse may have different numbers (40 and 384) marked in red.
Restart eclipse and compile the project with an error.
Some people on the Internet say this is not feasible. I don't know if it is because the author of the original article does not have a detailed description of how to modify it, because this problem has been solved on my machine. ^_^