Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android ADT 21.0.0. Memory leaks in graphical layout

I'm running ADT 21.0.0.v201210310015-519525 on eclipse 4.2.1 and each time I start working on graphical layout eclipse slowly starts to get unresponsive. After opening ~5 files like this it is practically unusable and need to restart.

Anyone else got these issues?

I've set my .ini in eclipse to increased memory and java 1.6 like mentioned in some solutions but problem still persists.

-Dosgi.requiredJavaVersion = 1.6
-Xms128m
-Xmx1024m
like image 346
Bojan Avatar asked Nov 15 '12 13:11

Bojan


2 Answers

I had this problem and I had to upgrade both eclipse and ADT to the nightly build, as it addressed this problem

like image 103
CQM Avatar answered Sep 18 '22 05:09

CQM


Actually, this problem occurs when you try to load the very heavy layout in eclipse. by heavy layout I mean, if you are trying to load the heavy graphics in layout OR if you are trying to use custom control in your layout.

When you try to open your layout (visually) in eclipse it actually tries to compile and run the custom control classes and try to render the view.

as eclipse is having very less heap size this crashing issues occurs. I advice you to check this type of layout into emulator OR device rather then testing it on Eclipse i.e. just avoid loading of this type of layout and try to work in XML and run it in emulator.

like image 23
Umang9 Avatar answered Sep 22 '22 05:09

Umang9