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

时光总嘲笑我的痴心妄想 提交于 2019-11-29 09:07:33

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?

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?).

Mudassir

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”

For me, I tried to add a @drawable/add.png to a menu item's icon attribute before realising that it's a declarative literal and not a bloody path.

Simply removing the .png and my problem was solved q:)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!