Stackoverflow error for Android / Eclipse

Each time I add an ab xml layout in the res folder, a message appears stating that a problem has occurred in logo.xml: java.lang.StackOverflowError, and when I click ok, Eclipse says:

An error has occurred. You are advised to exit the workbench. Subsequent errors may occur and the workbench may be without warning. See the .log file for details.

Do you want to leave the workplace?

I can’t understand why. It is annoying and frustrating. How can I 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: An error appears every time I add an Android XML file to the / res folder, and sometimes it appears even when I open the xml file in the / res folder.

+8
android android- stack-overflow android-xml
source share
2 answers

Just this problem. When he asks to close the workstation, answer β€œno”, go to the graphical representation of the open XML file and change the subject using the combo box in the upper right corner. If this does not work, try playing with other settings. There must be some kind of error in the Android graphics editor.

+8
source share

Right click on your project.

Select Android Tools> Add Support Libraries ...

(a progress bar will appear, and voila should load what you need)

By the way, you should install the latest version of Android-sdk. From your screenshot, this does not seem to be the case yet.

Or you can try it too

Make sure that the android: targetSdkVersion value in AndroidManifest.xml matches target = android - in project.properties. If these two values ​​do not match, creation using build tools version 19.0.0 will end in a BufferOverflowException. A source

There is also some guidance on the comments on this post that you need to configure at least 19 (android-19). Please leave a comment if this solution also works if your goal is <19.

Here's how the fix is ​​looking for my project. AOSP-related issue is # 61710.

1 If you really need to downgrade, you do not need to remove the build tools 19.0.0, just install 18.1.1 and add sdk.buildtools = 18.1.1 to the local.properties file.

0
source share

All Articles