我正在尝试在我的Android应用中添加操作栏操作按钮到我的操作栏.每次我向res/menu /(某些xml文件)添加一个动作按钮时,我一直得到错误aapt:返回代码138.所以即使eclipse说错误不是因为我的代码,也一定是因为我的代码.每当我在"菜单"目录中创建的xml文件中添加操作按钮时,就会弹出错误.根据这一点,它与不在res/values/strings.xml中声明我的字符串有关.但即使我在那里声明我的字符串,错误仍然会弹出!这简直就是真气.我将在下面包含我的菜单和字符串xml文件,以防他们的错误.如果您需要更多信息或有其他问题,请随时提出.
strings.xml文件
Beacon Portal Settings Action Bar Icon Edit Hello world! This is where the schedule goes when I get around to making that because it seems like some people want that This is ViewPager Fragment Tab 1 This is ViewPager Fragment Tab 2 Open navigation drawer Close navigation drawer - Schedule
- Homework Due
- Logout
- @drawable/ic_action_go_to_today
- @drawable/ic_action_duehomework
- @drawable/ic_action_logout
Item Icon OpenMinds ActionView About Edit Schedule Apply Edits
menu_fragment_apply.xml(在res/menu /中)
Tor Norbye.. 9
问题是
应用程式:showAsAction = "ifRoom"
那应该是
机器人:showAsAction = "ifRoom"
代替.当你使用app compat库时,使用app:showAsAction,我假设你没有在这里使用.
问题是
应用程式:showAsAction = "ifRoom"
那应该是
机器人:showAsAction = "ifRoom"
代替.当你使用app compat库时,使用app:showAsAction,我假设你没有在这里使用.