Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android App development error: "Bad XML block: header size 60 or total size 3932356 is larger than data size 0" [closed]

Tags:

I checked other posts that were similar and they recommended to clean the build path, but that did not help at all.
I have started android app development and am having a frustrating problem with adding a menu to an activity.

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:id="@+id/save_tea" android:title="@string/save_tea_label" />
</menu>

This throws the "Bad XML block: header size 60 or total size 3932356 is larger than data size 0" in the Eclipse console. I have a menu for the main app activity and it works fine, but this one cannot be combined into the R generated file.

I rewrote a bunch of my pages and it seems to work now, so I either missed something originally or eclipse decided to reevaluate the file.

like image 530
Weston Boone Avatar asked Jan 03 '12 00:01

Weston Boone


3 Answers

I just ran into the same error message. In my case, the XML was referencing a missing icon file in the drawables folder.

Is it possible you did not have string/save_tea_label at the time of the error?

like image 123
jfritz42 Avatar answered Sep 28 '22 01:09

jfritz42


A Project->Clean should take care of this.

Edit: If a clean build didn't help, can you try replacing the XML file in question with the following contents (create a new file):

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
  <item
      android:id="@+id/save_tea"
      android:title="@string/save_tea_label" />
</menu>

The only thing I can think of is that a weird character got in there somehow (copy/paste?).

like image 29
Marvin Pinto Avatar answered Sep 28 '22 03:09

Marvin Pinto


Make sure you are not using any APIs not available for the API level you are developing for. See this post for details; Error in the sample code “bluetooth chat”

like image 35
Mudassir Avatar answered Sep 28 '22 03:09

Mudassir