After 2 days of research I finally found the solution.
The post [here][1]
[1]: Android style Resources compile (aapt) failing : Bad resource table: header size 0xc helped me.
It doesn't matter if it's an Android project or a library one, but when you have declared a new id in one of your styles then you cannot add an ids.xml file to declare unique ids.
In my case, I had declared a style in my res/values/styles.xml
<style name="ActionBar">
<item name="android:id">**@+id/actionbar_container**</item>
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">@dimen/actionbar_height</item>
<item name="android:orientation">horizontal</item>
<item name="android:background">@drawable/actionbar_gradient</item>
</style>
and then added a res/values/ids.xml where I declared some unique ids. For example,
<resources>
<item type="id" name="menu_refresh" />
</resources>
After adding this file, R stopped generating. Project Clean didn't do the work.
When I changed the declaration in styles.xml to @id/actionbar_container, R started generating again. The difference is that I have declared the id in my ids.xml file while I reference in the style above using @id and not @+id.
Conclusion: If you want to declare unique ids in a resource file (i.e. ids.xml) double-check that you have not declared any new ids (using the @+id syntax) in your styles first.
Hope that helps anyone with the same problem.
Happy coding!!!