运行一个项目时在一个menu.xml文件item属性android:showAsAction 报错 No resource identifier found for attribute 'showAsAction' in package 'android'

google了下,老外说是版本问题,showAsAction was added in API level 11要将API提升到11,添加 "android-support-v7-appcompat.jar" 到Android库( Private Libraries)

android:showAsAction = "never"

当你的应用程序目标设为蜂巢平台时,你可以利用Action Bar部件提供的全部功能,将你的选项菜单项放在Action Bar的右上角,对用户来说使用更方便,控制该行为的主菜单项属性是android:showAsAction。
  这个属性可接受的值有:
  1、always:这个值会使菜单项一直显示在Action Bar上。
  2、ifRoom:如果有足够的空间,这个值会使菜单项显示在Action Bar上。
  3、never:这个值使菜单项永远都不出现在Action Bar上。
  4、withText:这个值使菜单项和它的图标,菜单文本一起显示。

不过这里没有用到这高版本,此处删除这个属性就OK了。

No resource identifier found for attribute 'showAsAction' in package 'android'的更多相关文章

  1. res\menu\main.xml:6: error: No resource identifier found for attribute 'showAsAction' in package 'com.xxx.xxxx'

    res\menu\main.xml:6: error: No resource identifier found for attribute 'showAsAction' in package 'co ...

  2. Error:(108) No resource identifier found for attribute 'style' in package 'android'

    Error:(108) No resource identifier found for attribute 'style' in package 'android' 解决方案: 这是错误的写法: a ...

  3. apktool 回编译报错:No resource identifier found for attribute 'xxxxxx' in package 'android' W:

    C:\xxxx\app-release\res\layout-v26\xxxx.xml:5: error: No resource identifier found for attribute 'xx ...

  4. Android调试错误-No resource identifier found for attribute 'showAsAction'

    转载自:http://www.bubuko.com/infodetail-498830.html 1.问题描述: 24\YoumiAndroidSdk\demo\offers\res\menu\mai ...

  5. 自定义view中错误:No resource identifier found for attribute X in package X

  6. Error:(12) No resource identifier found for attribute 'titles' in package 'com.itheima52.mobilesafe5

    http://stackoverflow.com/questions/5819369/error-no-resource-identifier-found-for-attribute-adsize-i ...

  7. error: No resource identifier found for attribute ‘backIcon’ in package

    异常提示: 今天我新创建了一个自定义控件,我为他定义了一个属性为backIcon,但是当我在xml设置这个属性之后,xml布局界面提示以下错误: 错误原因: 在网上查找错误原因的时候,有文章说这是因为 ...

  8. 踩坑实录 使用 cardview 时报错 error: No resource identifier found for attribute 'cardCornerRadius' in package 'com.xxxxx.xxx'

    在项目中引用 cardview 卡片布局,编译时 Android Studio 报出下面图片中红框标记的错误: 出现这种情况的原因在于没有导入 cardview 卡片布局相应的依赖包,因此我们需要在 ...

  9. 解决 Delphi XE5 写Android程序的No resource identifier found for attribute... 错误【转】

    原文:http://www.hxhlb.cn/article/32142aaeb67bbc05379369c3.html 那一天,我装上了RAD Studio XE5. 当天晚上,我就写了一个小小的A ...

随机推荐

  1. velocity整合servlet

    目录结构点我下载工程代码俩实体类不用说了看CustomerVelocityServlet类 package com.velocity.servlet;import java.util.ArrayLis ...

  2. C++混合编程之idlcpp教程Python篇(7)

    上一篇在这 C++混合编程之idlcpp教程Python篇(6) 第一篇在这 C++混合编程之idlcpp教程(一) 与PythonTutorial4工程相似,工程PythonTutorial5中,同 ...

  3. winform 子报表数据源赋值

    this.reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource(&qu ...

  4. MVC_Controller

    准备工作 安装VS2010或更高版本 安装数据库2008或更高版本 视个人系统不同配置IIS本地服务 数据库和VS下载地址 http://msdn.itellyou.cn/ 本节目标 通过本节案例对M ...

  5. centos 搭建ftp服务器

    1.安装vsftpd sudo yum install vsftpd 2.配置vsftpd.conf # Allow anonymous FTP? (Beware - allowed by defau ...

  6. 软件工程day7

    参与组内讨论,关于新功能“吐槽墙”的UI设计,小组决定使用TabControl控件实施. 于周末几天自己使用PS学习临摹了一些程序的icon,完成度不高. 鉴于正在参与开发的软件为“工具性”+“微社交 ...

  7. MQTT协议简记

    MQTT - MQ Telemetry Transport   轻量级的 machine-to-machine 通信协议. publish/subscribe模式. 基于TCP/IP. 支持QoS. ...

  8. 【Bugly 技术干货】Android开发必备知识:为什么说Kotlin值得一试

    1.Hello, Kotlin Bugly 技术干货系列内容主要涉及移动开发方向,是由 Bugly邀请腾讯内部各位技术大咖,通过日常工作经验的总结以及感悟撰写而成,内容均属原创,转载请标明出处. 1. ...

  9. 认识SQLServer索引以及单列索引和多列索引的不同

     一.索引的概念 索引的用途:我们对数据查询及处理速度已成为衡量应用系统成败的标准,而采用索引来加快数据处理速度通常是最普遍采用的优化方法. 索引是什么:数据库中的索引类似于一本书的目录,在一本书中使 ...

  10. Kinect for Windows SDK 1.8的改进及新特性

    今年3月, 微软推出了Kinect for Windows SDK 1.7 更新,包括了手势识别 Kinect Interactions 和实时 3D 建模 Kinect Fusion 两项新技术. ...