简体   繁体   中英

Eclipse and xml files in Android

For reasons unfathomable to me, sometimes I edit an xml file (such as res\\layout\\main.xml) and Eclipse stops recognizing it. I get errors like "Bad XML block: header size 93 or total size 0 is larger than data size 0".

If I delete the contents and retype the xml file everything works fine.

Any ideas what's going on?

See this problems usually comes because of menu -

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

Better if you are not using menu so remove it otherwise give the proper string information there.

Thanks

Try out both this things ,this can be help you to resolve the problem:

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

or

A Project->Clean should take care of this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM