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

  • 相关阅读:
    鼠标放在图片上出现提示
    NSIS调用dll
    IIS7 CMD命令
    NSIS检测
    NSIS修改文件夹访问权限
    NSIS——检测IIS是否安装及版本
    NSIS——检测SQL Server安装版本
    NSIS使用技巧集合
    提供修复界面的NSIS安装包
    NSIS MUI教程
  • 原文地址:https://www.cnblogs.com/lilihuang/p/2160008.html
Copyright © 2011-2022 走看看