踩坑实录 使用 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 ...
随机推荐
- python - bilibili(二)出错的解决办法
在获取房间号之前我们先解决上篇文章遗留的bug,即输入的房间号不是数字和对应的房间号不存在而产生的问题. 输入的房间号不是数字: 在python中,你所输入的必定是字符串,虽然你输入的是数字,但是类型 ...
- iphone在iframe页面的宽度不受父页面影响,避免撑开页面
工作中有个需求,就是产品页面通过iframe引用显示产品协议页,要求不要横向滑动,只需要竖向滑动,但在iphone中引用的iframe会撑开父页的宽度,而在android端浏览器这不会. <di ...
- 2017年2月22日-----------乱码新手自学.net 之Entity Framework 增删改
由于我是自学的,没有人教,在网上查资料也查不到个所以然.问大神们也是爱理不理的. 所以这篇随笔纯粹源自于我自己的认识.是否真正正确我也没有把握. 如果有什么错误,请大神们给予指正 ========== ...
- LINUX RHEL6.5字符界面安装图形化桌面
安装RHEL 6.5 系统,也是一波三折.好不容易把系统装上去了,发现没装图形化界面.重装倒是学会了,不过觉得太麻烦,于是有了今天. 查了很多帖子,然后自己一一尝试,发现都是说简单,只要 yum gr ...
- SQL语句使用时间和日期的函数
getdate():获取系统当前时间dateadd(datepart,number,date):计算在一个时间的基础上增加一个时间后的新时间值,比如:dateadd(yy,30,getdate())d ...
- Easyui _treegrid 动态加载子节点
<table id="dg" class="easyui-treegrid" title="数据字典列表" data-options= ...
- Dapper的扩展这个你知道嘛?
之前写的ORM对比文章中,我选Dapper作为底层ADO的基础访问框架后,我对此再次进行进一步的深入研究,发现里面还有延伸了一些好用的扩展方法和特性,那我便简单的跟大家说一下特性标签. 一.Table ...
- alisql安装步骤
卸载原有自带的Mysql yum remove mysql-libs 安装依赖包 yum install centos-release-scl devtoolset-4-gcc-c++ devto ...
- dll
dll可以有一个入口点函数,系统会在不同的时候调用这个入口函数.这个调用是通知性质的,通常被dll用来执行一些与进程或线程有关的初始化和清理工作如果将dll的入口点函数命名为DllMain之外的其他名 ...
- Yii里model验证的小技巧
例如:需要判断,字符长度在12-20之间,最大长度的提示语用tooLong,最小提示语言用tooShort array('pay_order', 'length', 'max' => 20, ' ...