我正在尝试使用eclipse中的Greendroid库。在我将其作为库导入的那一刻,项目就刹车了。生成的R文件消失,我的应用程序无法编译(由于此行为)。我将Greendroid框架作为一个普通的android项目导入。
当使用Greendroid时,我的应用程序开始抛出错误:
W/ResourceType( 7692): Bad resource table: header size 0xc or total size 0x12a95 is not on an integer boundary
[...] W/ResourceType( 7692): Bad resource table: header size 0xc or total size 0x12a95 is not on an integer boundary
[...] ERROR: Unable to parse generated resources, aborting.有什么建议如何正确导入/安装/链接Greendroid吗?
发布于 2011-09-29 16:29:06
我想出了解决问题的办法。它在一个类似的帖子(Android style Resources compile (aapt) failing : Bad resource table: header size 0xc)中被引用。问题出在styles.xml文件中。这并不明显,因为编译器没有给出任何编译出错的提示。在我更改的样式文件的styles.xml中,不能在其声明中使用"+“引用样式
<item name="android:id">@+id/background_logo</item>至
<!-- <item name="android:id">@+id/background_logo</item> -->一切都很顺利。如果您需要这样的属性,请使用参考问题中所示的ids.xml。这很难跟踪,但这样的错误就是由这个错误的声明引起的。
https://stackoverflow.com/questions/7585787
复制相似问题