3

i am getting this erro in my error log and my eclipse hangs tottaly , saying my xml layout file has more than 80 views , now in order to carry some header footer and some border layouts , i need to have this many views ,

is there any solution for this prob ??????

eclipse.buildId=I20100608-0911
java.version=1.6.0_35
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product


Error
Wed Oct 24 17:15:01 IST 2012
activity_change_alert_settings.xml: Java heap space

java.lang.OutOfMemoryError: Java heap space
at org.eclipse.jdt.internal.compiler.util.Util.getInputStreamAsByteArray(Util.java:317)
at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsByteArray(Util.java:1136)
at org.eclipse.jdt.internal.core.JavaProject.readFileEntriesWithException(JavaProject.java:2420)
at org.eclipse.jdt.internal.core.JavaProject.readFileEntries(JavaProject.java:2461)
at org.eclipse.jdt.internal.core.JavaProject.readRawClasspath(JavaProject.java:2499)
at com.android.ide.eclipse.adt.internal.resources.manager.ProjectClassLoader.getExternalJars(ProjectClassLoader.java:260)
at com.android.ide.eclipse.adt.internal.resources.manager.ProjectClassLoader.loadClassFromJar(ProjectClassLoader.java:232)
at com.android.ide.eclipse.adt.internal.resources.manager.ProjectClassLoader.findClass(ProjectClassLoader.java:76)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.android.ide.eclipse.adt.internal.editors.layout.ProjectCallback.loadView(ProjectCallback.java:153)
at android.view.BridgeInflater.loadCustomView(BridgeInflater.java:207)
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:135)
at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
at com.android.layoutlib.bridge.android.BridgeContext.inflateView(BridgeContext.java:364)
at com.android.layoutlib.bridge.impl.binding.BaseAdapter.getView(BaseAdapter.java:148)
at com.android.layoutlib.bridge.impl.binding.FakeAdapter.getView(FakeAdapter.java:106)
at android.widget.Spinner.measureContentWidth(Spinner.java:669)
at android.widget.Spinner.onMeasure(Spinner.java:432)
at android.view.View.measure(View.java:15172)
at android.widget.TableRow.getColumnsWidths(TableRow.java:312)
at android.widget.TableLayout.findLargestCells(TableLayout.java:504)
at android.widget.TableLayout.measureVertical(TableLayout.java:469)
at android.widget.TableLayout.onMeasure(TableLayout.java:435)
at android.view.View.measure(View.java:15172)
at android.widget.RelativeLayout.measureChild(RelativeLayout.java:602)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:415)
at android.view.View.measure(View.java:15172)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:617)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:399)
at android.view.View.measure(View.java:15172)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:617)

1 Answer 1

10

Try increasing the java heap space settings in eclipse.ini file and see if that helps

--launcher.XXMaxPermSize
512M
-Xms512m
-Xmx1024m

These three settings are the ones that you'd need to modify. You can chose higher values in case Eclipse continues to hang.

Sign up to request clarification or add additional context in comments.

4 Comments

can u plz explain the last two lines
yeah its worked i just replaced all the 256M , with 1024 M , i hope it will not affect me in any other part , no side effect right ???
These values are the heap values used by the JVM that launches eclipse. Xms is the minimum heap value that the jvm will use and XMX is the maximum heap value. You have just increased these values, there will be no other problems you'll face.
A week ago I modified the .ini file with what u have recommended and it has fixed the problem for a while. But I have the same problem now ! can I increase it even more ?? knowing that I have a 6Gb memory ?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.