“在包‘android’中找不到属性‘showAsAction’的资源标识符"; [英] "No resource identifier found for attribute 'showAsAction' in package 'android'"

查看:29
本文介绍了“在包‘android’中找不到属性‘showAsAction’的资源标识符";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试更新我的 android 应用程序,以使运行 Honeycomb 的平板电脑看起来更好.因此,我的目标是 SDK 的第 11 版(我的 minSdkVersion = 4).这将 Honeycomb 主题添加到我的应用程序中,使其看起来更好.但是,我无法访问我的菜单选项.因此,我试图将我的菜单项添加为操作栏项,并在我的/res/menu/文件夹中的文件中添加以下内容:

I am attempting to update my android application to look better for tablets running Honeycomb. As such, I am targeting version 11 of the SDK (my minSdkVersion = 4). This adds the Honeycomb theme to my app, making it look better. However, I have no way to access my menu options. So, I am attempting to add my menu items as an action bar item with the following in the file in my /res/menu/ folder:

android:showAsAction="ifRoom|withText"

但是,我收到以下错误:

However, I get the following error:

在包android"中找不到属性showAsAction"的资源标识符

No resource identifier found for attribute 'showAsAction' in package 'android'

我尝试将 minSdkVersion 编号更改为 11 以查看它是否有效,但没有成功.有任何想法吗?谢谢!

I tried altering my minSdkVersion number to 11 to see if it would work, but no luck. Any ideas? Thanks!

推荐答案

如果您使用 Eclipse 构建,请确保您的项目的构建目标也设置为 Honeycomb.

If you are building with Eclipse, make sure your project's build target is set to Honeycomb too.

这篇关于“在包‘android’中找不到属性‘showAsAction’的资源标识符";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆