报错“No resource found that matches the given name 'Theme.AppCompat.Light”-完美解决方案
来源:互联网 发布:加大usb电流软件 编辑:程序博客网 时间:2024/03/28 23:38
在Eclipse中导入别人的项目时,通常会出现这样的报错信息:
“No resource found that matches the given name 'Theme.AppCompat.Light”类似的
解决方案就是:
我们的项目需要两个库:android-support-v4.jar,android-support-v7-appcompat.jar。一般缺少的是v7。
第一步:
在项目中导入这两个库
可以通过在项目根目录创建一个libs文件,然后把这两个库拷贝到里面,然后eclipse刷新一下这个项目,eclipse会智能添加这两个库。
(此图参考别人)
第二步:
用import导入项目 v7中的appcompat
D:\android-sdk_r23.0.5-windows\android-sdk-windows\extras\android\support\v7\appcompat
这时候,项目可能会报错,(如下图)
打开project.properties 把target=android-19 改成 target=android-21,clean下即刻发现错误消失。(如下图)
第三步:
在本项目中引入v7-appcompat,方法如下。若还有错则把本项目中的project.properties 的target尽量改高,如 target=android-21。
大功告成啦啦啦啦~~~~噢耶~~~~嘻嘻嘻~~~^^
ps:后来我又莫名地遇到 v4 jar包重复版本不一致的问题。。。
报错为“Found 2 versions of android-support-v4.jar in the dependency list”.
解决起来很简单啦~
就是把本项目中libs目录下的v4 jar包果断删掉!然后就OK啦。
0 0
- 报错“No resource found that matches the given name 'Theme.AppCompat.Light”-完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- 新建Android项目报错"No resource found that matches the given name 'Theme.AppCompat.Light'."
- 关于安卓出现No resource found that matches the given name 'Theme.AppCompat.Light 的完美解决方案
- Android Studio 报No resource found that matches the given name '@style/Theme.AppCompat.Light'.
- No resource found that matches the given name 'Theme.AppCompat.Light 的解决方案
- Error:No resource found that matches the given name 'Theme.AppCompat.Light'.解决方案
- CSU 1256 天朝的单行道
- 剑指offer 二进制中1的个数
- TCP/IP、Http、Socket的区别
- linux c编程 多线程(初级)
- mysql_jdbc
- 报错“No resource found that matches the given name 'Theme.AppCompat.Light”-完美解决方案
- c单链表小案例2
- MSP430G2553与MSP430F5336系列单片机总结[2]——定时器与捕捉比较器以及中断介绍
- 8.18日学习内容
- 解题报告 之 CodeForces 6E Exposition
- hdu 3591 The trouble of Xiaoqian 多重背包(二进制)+完全背包!
- HDU 2883 kebab(最大流,满流)
- Linux知识点
- 保存图片到SD卡