zoukankan      html  css  js  c++  java
  • 一个res/values/ids.xml引发的血案

    背景介绍:

    想在View上动态的setId,所以需要预先定义好id,以便使用,api上说,可以添加res/values/ids.xml的资源,用于定义公共的id,使用时直接R.id.id_name或android:id="id/id_name"即可。

    结果:

    [2011-08-30 21:06:13 - demo] W/ResourceType(  376): Bad resource table: header size 0xc or total size 0x186b6 is not on an integer boundary

    [2011-08-30 21:06:13 - demo] W/ResourceType(  376): Bad resource table: header size 0xc or total size 0x186b6 is not on an integer boundary

    [2011-08-30 21:06:13 - demo] ERROR: Unable to parse generated resources, aborting.

    原因:

    style中有个<item name="android:id">@+id/navigation_bar</item>,这样会导致上面的错误,原因不知,大概是android在使用了ids.xml后,需要所有的样式中的id都使用已在ids.xml中预先定义好的。

    可参考下文:http://stackoverflow.com/questions/6009618/android-style-resources-compile-aapt-failing-bad-resource-table-header-size

    android api:http://developer.android.com/guide/topics/resources/more-resources.html

  • 相关阅读:
    js 表格上下移动 javascript实现
    存储过程-----DECLARE---实用注意事项
    储存过程-原理、语法、函数详细说明
    第九章 接口
    第八章 多态
    第七章 类复用
    synchronized ---- 作用
    集合框架综述
    java static代码块执行时机
    状态模式
  • 原文地址:https://www.cnblogs.com/lilihuang/p/2160008.html
Copyright © 2011-2022 走看看