踩坑实录 使用 cardview 时报错 error: No resource identifier found for attribute 'cardCornerRadius' in package 'com.xxxxx.xxx'
在项目中引用 cardview 卡片布局,编译时 Android Studio 报出下面图片中红框标记的错误:

出现这种情况的原因在于没有导入 cardview 卡片布局相应的依赖包,因此我们需要在 build.gradle 文件中添加相应的依赖,
compile 'com.android.support:cardview-v7:25.3.0' 需要注意的是,cardview 的依赖版本不能高于 support:appcompat 的版本数,否则无法成功添加依赖!
我的 support:appcompat 版本为 compile 'com.android.support:appcompat-v7:25.3.0' ,因此cardview 的版本必须小于等于此版本方可成功添加依赖。
踩坑实录 使用 cardview 时报错 error: No resource identifier found for attribute 'cardCornerRadius' in package 'com.xxxxx.xxx'的更多相关文章
- 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 ...
- 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 ...
- error: No resource identifier found for attribute ‘backIcon’ in package
异常提示: 今天我新创建了一个自定义控件,我为他定义了一个属性为backIcon,但是当我在xml设置这个属性之后,xml布局界面提示以下错误: 错误原因: 在网上查找错误原因的时候,有文章说这是因为 ...
- Android 官网提供的Custom-view 编译出错--error: No resource identifier found for attribute
error: No resource identifier found for attribute in custom-views from http://developer.android.com ...
- 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 ...
- 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 ...
- JAVA实用案例之文件导出(JasperReport踩坑实录)
写在最前面 想想来新公司也快五个月了,恍惚一瞬间. 翻了翻博客,因为太忙,也有将近五个多月没认真总结过了. 正好趁着今天老婆出门团建的机会,记录下最近这段时间遇到的大坑-JasperReport. 六 ...
- JasperReport报表导出踩坑实录
写在最前面 翻了翻博客,因为太忙,已经好久没认真总结过了. 正好趁着今天老婆出门团建的机会,记录下最近这段时间遇到的大坑-JasperReport. 六月份的时候写过一篇利用poi文件导入导出的小De ...
- 打包新版本上传到AppStore时报错 ERROR ITMS-90034:
今天打包新版本上传到AppStore时报错 ERROR ITMS-90034:"Missing or invalid signature.The bundle'com.xxx.xxx' at ...
随机推荐
- 使用光盘iso实现Linux操作系统的自动安装部署
前边写了一篇使用 PXE 的方式批量安装操作系统,不是任何时候任何地方都有环境来通过 PXE 方式来进行安装.如果此时需要通过光盘安装,默认的情况下是通过交互式方式进行安装,其实也可以通过 kicks ...
- BZOJ USACO 银组 水题集锦
最近刷银组刷得好欢快,好像都是水题,在这里吧他们都记录一下吧(都是水题大家一定是道道都虐的把= =)几道比较神奇的题到时再列出来单独讲一下吧= =(其实我会说是BZOJ蹦了无聊再来写的么 = =) [ ...
- MongoDB的安装及恢复
在http://www.mongodb.org/display/DOCS/Downloads 下载对应版本 mongodb 安装数据库 解压文档,复制到c盘,改名为mongodb 新建文件夹c:/da ...
- Activemq 宕机解决方案
关于消息服务的集群,大概分为Consumer集群(消费者集群)和Broker集群(消息服务器集群)两种.ActiveMQ提供了一种叫做失效转移(也叫故障转移,FailOver)的策略.失效转移提供了在 ...
- php调用API支付接口(使用第三方接口,调用的天工接口。)
首先访问 https://charging.teegon.com/ 注册账号, 找到开发配置 记下client_id和client_secret. 点击 天工开放平台 点击天工收银 点击 S ...
- C语言中NULL的定义
用C语言编程不能不说指针,说道指针又不能不提NULL,那么NULL究竟是个什么东西呢? C语言中又定义,定义如下: #undef NULL #if defined(__cplusplus) #defi ...
- mfc---添加背景图
添加背景图: CDC m_dcMem CBitmap m_bmpMem CDC * pDC = GetDC(); m_dc.CreateComparableDC(pDC); m_bmpMem.Load ...
- macOS apache配置及开启虚拟服务器的开启,apache开启重写模式
今天把自己的mac系统升到最新版,但是,apache却不能用了,因为mac上的apache是系统自带的,因为是mac目前的最新系统,所以出现了好多问题,整理了一下午也没有啥进展,最后还是把原来的在云盘 ...
- html基础知识2(有序无序列表,表格)2017-03-08
摘要:php 基础知识2 重点:有序无序列表:<a>标签:<table>标签 内容容器 1.段落标签 <p></p> 注: 执行前后换行,并空一行 ...
- java 类与类之间的关系 及uml图
类与接口之间的关系 : 继承 类与类之间的关系 :继承关系 包含关系 类与对象之间的关系 : 实例 UML 类图中类与类之间的关系: 泛化关系(generalization) 关联关系(associ ...