开发者

Greendroid import

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开发者_如何学JAVA 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 ?


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

<item name="android:id">@+id/background_logo</item>

to

<!-- <item name="android:id">@+id/background_logo</item> -->

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜