Greendroid导入
我正在尝试在 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 吗?
Im trying to use the Greendroid library inside eclipse.
In the moment i import it as a library the project brakes. The generated R file disappears and my application cant compile (Due to this behavior).
I import the Greendroid framework as a normal android project.
When using Greendroid my application starts throwing errors:
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.
Any suggestions how to import / install / link against Greendroid properly ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想出了如何解决这个问题。
它在类似的帖子中被引用(Android style资源编译 (aapt) 失败:资源表错误:标头大小 0xc)。
问题出在 styles.xml 文件中。这并不明显,因为编译器没有给出编译出错的任何提示。
样式不能在 styles.xml 的声明中用“+”引用
在我的样式文件中,我更改
为
,一切顺利。如果您需要这样的属性,请使用 ids.xml,如引用的问题中所示。
这确实很难追踪,但这样的错误就是由这个错误的声明引起的。
I figured out how to solve the problem.
It was referenced in a similar post (Android style Resources compile (aapt) failing : Bad resource table: header size 0xc).
The problem is located in the styles.xml file. It isn't obvious as the compiler doesn't give a single hint where the compilation went wrong.
Styles cant be referenced with a "+" in their declaration in the styles.xml
In my styles file i changed
to
and everything went well. If you need such an attribute, use the ids.xml like its shown in the referenced question.
This is seriously hard to track, but such an error is caused by this wrong declaration.