【问题标题】:Integer types not allowed (at 'showAsAction' with value '0x0')不允许使用整数类型(在“showAsAction”处,值为“0x0”)
【发布时间】:2012-12-10 23:36:30
【问题描述】:

我使用eclipse构建了一个android应用程序。我最近错误地删除了项目。但是我有项目的apk文件。所以我使用apktool,dex2jar和java调试器来获取我的应用程序的源代码,但是现在,当我在 eclipse 中导入应用程序并尝试运行它时,我得到了这些错误:

[2012-12-24 20:30:54 - loser] W/ResourceType( 2328): Bad XML block: header size 78 or total size 0 is larger than data size 0
[2012-12-24 20:30:54 - loser] C:\Users\itz_n_000\workspace\loser\res\values-v14\styles.xml:1: error: Error parsing XML: no element found
[2012-12-24 20:30:54 - loser] C:\Users\itz_n_000\workspace\loser\res\menu\main.xml:4: error: Error: Integer types not allowed (at 'showAsAction' with value '0x0').
[2012-12-24 20:35:54 - loser] W/ResourceType( 3520): Bad XML block: header size 100 or total size 0 is larger than data size 0
[2012-12-24 20:35:54 - loser] C:\Users\itz_n_000\workspace\loser\res\values-v14\styles.xml:1: error: Error parsing XML: no element found
[2012-12-24 20:35:54 - loser] C:\Users\itz_n_000\workspace\loser\res\menu\main.xml:4: error: Error: Integer types not allowed (at 'showAsAction' with value '0x0').
[2012-12-24 20:43:13 - loser] W/ResourceType( 2376): Bad XML block: header size 100 or total size 0 is larger than data size 0
[2012-12-24 20:43:13 - loser] C:\Users\itz_n_000\workspace\loser\res\values-v14\styles.xml:1: error: Error parsing XML: no element found
[2012-12-24 20:43:13 - loser] C:\Users\itz_n_000\workspace\loser\res\menu\main.xml:4: error: Error: Integer types not allowed (at 'showAsAction' with value '0x0').
[2012-12-24 20:45:55 - loser] W/ResourceType( 3740): Bad XML block: header size 78 or total size 0 is larger than data size 0
[2012-12-24 20:45:55 - loser] C:\Users\itz_n_000\workspace\loser\res\values-v14\styles.xml:1: error: Error parsing XML: no element found
[2012-12-24 20:45:55 - loser] C:\Users\itz_n_000\workspace\loser\res\menu\main.xml:4: error: Error: Integer types not allowed (at 'showAsAction' with value '0x0').
[2012-12-24 20:50:49 - loser] W/ResourceType( 3916): Bad XML block: header size 94 or total size 7002568 is larger than data size 0
[2012-12-24 20:50:49 - loser] C:\Users\itz_n_000\workspace\loser\res\values-v14\styles.xml:1: error: Error parsing XML: no element found
[2012-12-24 20:50:49 - loser] C:\Users\itz_n_000\workspace\loser\res\menu\main.xml:4: error: Error: Integer types not allowed (at 'showAsAction' with value '0x0').
[2012-12-24 20:50:56 - loser] W/ResourceType( 2780): Bad XML block: header size 96 or total size 7129120 is larger than data size 0
[2012-12-24 20:50:56 - loser] C:\Users\itz_n_000\workspace\loser\res\values-v14\styles.xml:1: error: Error parsing XML: no element found
[2012-12-24 20:50:56 - loser] C:\Users\itz_n_000\workspace\loser\res\menu\main.xml:4: error: Error: Integer types not allowed (at 'showAsAction' with value '0x0').

请帮忙。

【问题讨论】:

    标签: android eclipse reverse-engineering


    【解决方案1】:

    使用以下映射:

        <!-- How this item should display in the Action Bar, if present. -->
        <attr name="showAsAction">
            <!-- Never show this item in an action bar, show it in the overflow menu instead.
                 Mutually exclusive with "ifRoom" and "always". -->
            <flag name="never" value="0" />
            <!-- Show this item in an action bar if there is room for it as determined
                 by the system. Favor this option over "always" where possible.
                 Mutually exclusive with "never" and "always". -->
            <flag name="ifRoom" value="1" />
            <!-- Always show this item in an actionbar, even if it would override
                 the system's limits of how much stuff to put there. This may make
                 your action bar look bad on some screens. In most cases you should
                 use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". -->
            <flag name="always" value="2" />
            <!-- When this item is shown as an action in the action bar, show a text
                 label with it even if it has an icon representation. -->
            <flag name="withText" value="4" />
            <!-- This item's action view collapses to a normal menu
                 item. When expanded, the action view takes over a
                 larger segment of its container. -->
            <flag name="collapseActionView" value="8" />
        </attr>
    

    【讨论】:

      猜你喜欢
      • 2015-03-05
      • 2016-05-17
      • 2016-05-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多