0

绑定菜单 xml 文件时显示此错误

 <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android" >

<item
    android:id="@id/menu_settings"
    android:orderInCategory="100"
    **at here show this error**android:showAsAction=["ifRoom" | "never" | "withText" | "always" | "collapseActionView"]
    android:title="@string/menu_settings"/>

4

2 回答 2

1

尝试将整个showAsAction值括在引号中:

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android" >

<item
    android:id="@id/menu_settings"
    android:orderInCategory="100"
    android:showAsAction="ifRoom|never|withText|always|collapseActionView"
    android:title="@string/menu_settings"/>
于 2013-04-25T06:12:58.577 回答
0

您可能会从书中复制粘贴文本或类似的东西。不是同一个引用:

height=”fill_parent”
height="fill_parent"
于 2015-03-09T19:05:42.583 回答