Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 5.83 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Android style Resources compile (aapt) failing : Bad resource table: header size 0xc
  2. Given a style
  3. <style name="ActionBarTitleContainer">
  4.     <item name="android:id">@id/title_container</item>
  5.     <item name="android:layout_width">fill_parent</item>
  6.     <item name="android:layout_height">@dimen/title_height</item>
  7.     <item name="android:orientation">horizontal</item>
  8.     <item name="android:background">@color/title_color_light</item>
  9. </style>
  10.        
  11. <item name="android:id">@id/info_container</item>
  12.  
  13.  
  14. <style name="ActionBarTitleContainer">
  15.     <item name="android:id">@id/title_container</item>
  16.     <item name="android:layout_width">fill_parent</item>
  17.     <item name="android:layout_height">@dimen/title_height</item>
  18.     <item name="android:orientation">horizontal</item>
  19.     <item name="android:background">@color/title_color_light</item>
  20. </style>
  21. <style name="ActionBarInfoContainer">
  22.     <item name="android:id">@id/info_container</item>
  23.     <item name="android:layout_width">fill_parent</item>
  24.     <item name="android:layout_height">@dimen/info_height1</item>
  25.     <item name="android:orientation">horizontal</item>
  26.     <item name="android:background">@color/title_color_light</item>
  27. </style>
  28.        
  29. <style name="ActionBarInfoContainer">
  30.     <item name="android:id">@id/info_container</item>
  31.  
  32. Description Resource Path Location Type
  33. error: Error: No resource found that matches the given name (at 'android:id' with value '@id/info_container'). styles.xml /MyApp/res/values line 68 Android AAPT Problem
  34.        
  35. <style name="ActionBarInfoContainer">
  36.     <item name="android:id">@+id/info_container</item>
  37.        
  38. W/ResourceType( 2202): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary
  39. W/ResourceType( 2202): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary
  40. ERROR: Unable to parse generated resources, aborting.
  41. 'aapt' error. Pre Compiler Build aborted.
  42.        
  43. <style name="ActionBarTitleContainer">
  44.     <item name="android:id">@id/title_container</item>
  45.     ....
  46. </style>
  47. <style name="ActionBarInfoContainer">
  48.     <item name="android:id">@id/info_container</item>
  49.     ....
  50. </style>
  51.        
  52. <resources>
  53.     <item type="id" name="title_container" />
  54.     <item type="id" name="info_container" />
  55.        
  56. Open Eclipse Preferences
  57. Open in the list on the left
  58.     Android
  59.         Build
  60. Set Build output to
  61.     Verbose
  62. Hit OK
  63. Open Console View
  64. Window > View > Console
  65. Do clean build or type a space in and file and hit save if you dont want to do full build
  66. Resources compiler aapt will run first
  67. and throw error
  68.        
  69. [2011-05-15 16:22:25 - MyApp]     (new resource id filechooser_file_view from /Users/user1/Documents/workspace/MyApp/res/layout/filechooser_file_view.xml)
  70. [2011-05-15 16:22:25 - MyApp]     (new resource id listbusmapsactivity_layout from /Users/user1/Documents/workspace/MyApp/res/layout/listbusmapsactivity_layout.xml)
  71. [2011-05-15 16:22:25 - MyApp]     (new resource id nearest_bus_maps_layout from /Users/user1/Documents/workspace/MyApp/res/layout/nearest_bus_maps_layout.xml)
  72. [2011-05-15 16:22:25 - MyApp]     (new resource id nearest_bus_stops_layout from /Users/user1/Documents/workspace/MyApp/res/layout/nearest_bus_stops_layout.xml)
  73. [2011-05-15 16:22:25 - MyApp] W/ResourceType( 2247): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary
  74. [2011-05-15 16:22:25 - MyApp] W/ResourceType( 2247): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary
  75. [2011-05-15 16:22:25 - MyApp] ERROR: Unable to parse generated resources, aborting.
  76. [2011-05-15 16:22:25 - MyApp]     (new resource id open_web_page_activity from /Users/user1/Documents/workspace/MyApp/res/layout/open_web_page_activity.xml)
  77. [2011-05-15 16:22:25 - MyApp]     (new resource id send_email_activity from /Users/user1/Documents/workspace/MyApp/res/layout/send_email_activity.xml)
  78. [2011-05-15 16:22:25 - MyApp] 'aapt' error. Pre Compiler Build aborted.
  79.        
  80. 'aapt' error. Pre Compiler Build aborted.
  81.        
  82. /send_email_activity.xml
  83.        
  84. Files:
  85.        
  86. TIP In the Console window find the last file that compiled ok before the error
  87. 'send_email_activity.xml'
  88. And do CTRL/CMD(Mac) + F for previous occurrences under the Files: section
  89.        
  90. Files:
  91.   drawable/alphabet_bar_bg.xml
  92.     Src: /Users/clearbrian/Documents/workspace/LondonBusStopMaps/res/drawable/alphabet_bar_bg.xml
  93.   drawable/alphabet_separator_bg.xml
  94.     Src: /Users/clearbrian/Documents/workspace/LondonBusStopMaps/res/drawable/alphabet_separator_bg.xml
  95. .......
  96. layout/send_email_activity.xml
  97.     Src: /Users/clearbrian/Documents/workspace/LondonBusStopMaps/res/layout/send_email_activity.xml
  98. values/colors.xml
  99.  Src: /Users/clearbrian/Documents/workspace/LondonBusStopMaps/res/values/colors.xml
  100.  .......
  101. values/themes.xml
  102.  Src: /Users/clearbrian/Documents/workspace/LondonBusStopMaps/res/values/themes.xml
  103. AndroidManifest.xml
  104.  Src: /Users/clearbrian/Documents/workspace/LondonBusStopMaps/AndroidManifest.xml
  105.        
  106. [2011-05-15 16:22:25 - MyApp] W/ResourceType( 2247): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary
  107. [2011-05-15 16:22:25 - MyApp] W/ResourceType( 2247): Bad resource table: header size 0xc or total size 0x4aba is not on an integer boundary
  108. [2011-05-15 16:22:25 - MyApp] ERROR: Unable to parse generated resources, aborting.
  109.        
  110. <style name="ActionBarInfoContainer">
  111.       <item name="android:id">@id/info_container</item>
  112.  ...
  113.       <item name="android:background">@color/title_color_light</item>
  114. </style>
  115.        
  116. <style name="ActionBarTitleContainer">
  117.      <item name="android:id">@id/title_container</item>
  118.      ...
  119. </style>
  120. <style name="ActionBarInfoContainer">
  121.      <item name="android:id">@+id/info_container</item>
  122.      ...
  123.  </style>
  124.        
  125. <item name="android:id">@+id/info_container</item>
  126.        
  127. <item name="android:id">@id/info_container</item>
  128.        
  129. <resources>
  130.      <item type="id" name="title_container" />
  131.      <item type="id" name="info_container"  />