【问题标题】:Greendroid importGreendroid 导入
【发布时间】:2011-09-28 15:40:34
【问题描述】:

我正在尝试在 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有什么建议吗?

【问题讨论】:

    标签: android greendroid


    【解决方案1】:

    我想出了如何解决这个问题。 它在类似的帖子 (Android style Resources compile (aapt) failing : Bad resource table: header size 0xc) 中被引用。 问题位于styles.xml 文件中。这并不明显,因为编译器没有给出编译出错的单一提示。 在 style.xml 的声明中不能用“+”引用样式 在我的样式文件中我改变了

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

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

    一切顺利。如果您需要这样的属性,请使用 ids.xml,如引用问题中所示。 这很难跟踪,但这样的错误是由这个错误的声明引起的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-05
      • 2016-08-31
      • 2016-02-29
      相关资源
      最近更新 更多