Android style Resources compile (aapt) failing : Bad resource table: header size 0xc Android style Resources compile (aapt) failing : Bad resource table: header size 0xc xml xml

Android style Resources compile (aapt) failing : Bad resource table: header size 0xc


I ran into this issue when importing a library project (GreenDroid) and it turned out to be the @+id issue for me as well.

What seems to be happening is that as long as you don't have a ids.xml file the Android SDK will allow you to declare new ids in styles.xml, but the moment that file exists it stops allowing this behavior. Unfortunately, it doesn't tell you that this is the problem and just crashes with the error noted in the original post:

 W/ResourceType( 2247): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary


On this page you'll find documentation on the meaning of +. The page documents layout XML files, but the same applies to styles (yeah, they should put this information in a better place).

For your convenience, here's the relevant documentation:

For the ID value, you should usually use this syntax form: "@+id/name". The plus symbol, +, indicates that this is a new resource ID and the aapt tool will create a new resource integer in the R.java class, if it doesn't already exist.

...

However, if you have already defined an ID resource (and it is not already used), then you can apply that ID to a View element by excluding the plus symbol in the android:id value.