Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StackOverflow error Android/Eclipse

Everytime I add ab xml layout in the res folder, an error pops up saying that a problem has occurred in logo.xml: java.lang.StackOverflowError and when I click ok, Eclipse says:

A stack overflow error has occurred. You are recommended to exit the workbench. Subsequent errors may happen and may terminate the workbench without warning. See the .log file for more details.

Do you want to exit the work bench?

I can't figure it out why. It's annoying and frustrating. How can I get fix it?

Here's logo.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   android:orientation="vertical" >

    <ImageView
       android:id="@+id/imageLogo"
       android:layout_width="wrap_content"
       android:layout_height="0dp"
       android:layout_weight="1"
       android:contentDescription="@string/desclogo"
       android:scaleType="center"
       android:src="@drawable/application_logo" />

</LinearLayout>

NOTE: The error pops up everytime I add an Android XML file in the /res folder, and sometimes it pops up even just opening the xml file in the /res folder.

like image 389
agony Avatar asked Jan 13 '12 01:01

agony


People also ask

What does stackoverflow error mean?

A stack overflow is a type of buffer overflow error that occurs when a computer program tries to use more memory space in the call stack than has been allocated to that stack.

Can you catch a stackoverflow error in Java?

StackOverflowError is an error which Java doesn't allow to catch, for instance, stack running out of space, as it's one of the most common runtime errors one can encounter.


1 Answers

Just had this problem. When it asks to close the workbench, answer no, go to the graphical view of the open XML file, and change the theme using the combobox in the top right. If that doesn't work, try playing with the other settings around it. Must be some kind of bug in the Android graphical editor.

like image 189
Dan2552 Avatar answered Oct 17 '22 22:10

Dan2552