绑定菜单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"/>
答案 0 :(得分: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"/>
答案 1 :(得分:0)
您可能会复制粘贴书籍中的文字或类似内容。引用不一样:
height=”fill_parent”
height="fill_parent"