v7-appcompat\res\values-v21\themes_base.xml:139: error: Error: No resource found that matches
来源:互联网 发布:淘宝女装店简介范文 编辑:程序博客网 时间:2024/04/29 10:57
v7-appcompat\res\values-v21\themes_base.xml:139: error: Error: No resource found that matches the given name
android-support-v7-appcompat\res\values-v21\themes_base.xml:139: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
android-support-v7-appcompat\res\values-v21\themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
android-support-v7-appcompat\res\values-v21\themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
android-support-v7-appcompat\res\values-v21\themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
android-support-v7-appcompat\res\values-v21\themes_base.xml:144: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
android-support-v7-appcompat\res\values-v21\themes_base.xml:148: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
今天升级了ADT(升级后为23.0.6)和SDK(Android 6.0),appcompat-v7和新建的工程都出现了问题,而且R文件不存在,这些让我纠结了一天,完成build-tools platform-tools等等各种更新,将原appcompat_v7删除,引入SDK中的v7,还是有错误。
造成错误原因:
ADT和SDK升级为高版本后,appcompat-v7解压到了extras/android/support/v7/appcompat/libs文件夹下,其中的values-v21或者values-v23在低版本中无法匹配。
直到找到下面的参考文章,然后尝试了一下,果然药到病除。
具体解决办法:
1、打开appcompat_v7的project.properties文件
2、将target sdk修改为当前更新的sdk版本
方法1:如我这里将“target=android-19"改为”target=android-23“
方法2:选中当前工程,右击Properties,选择Android,将Project Build Target中的Target选为Android6.0
3、刷新或clean或重启Eclipse,错误消除。
参考:http://blog.csdn.net/jjwwmlp456/article/details/40514817
更新2016-06-16 近期换了一台实验室笔记本使用,且装有Android,一开始没注意配置情况(配置环境变量和目录比较混乱),创建项目后,总是关于appcompat_v7报错,需自己配置一下。
(1)将sdk目录下的extras/android/support/v7/appcompat/libs的android-support-v4.jar和android-support-v7-appcompat.jar更换为之前使用的jar文件,发现还是values-v21报错;
(2)在appcompat_v7的project.properties文件中将target sdk修改为当前”target=android-23“,结果报错“Unable to resolve target 'android-23'”,仔细一看该adt版本与更换后的appcompat版本不一致;
(3)重新安装adt 23.0.6,并离线更新相关资源,详细方法可看http://blog.csdn.net/renwudao24/article/details/43736887,环境变量中设置android_sdk_home,并在path路径中添加tools和platform_tools路径;开启SDK Manager;打开eclipse修改android sdk路径;
(4)clean后发现报错values-23的错误,修改project.properties为”target=android-23“
总结:关于values-v21 或v23以及其它资源未找到的错误,应该是adt版本与appcompat-v7和v4的版本不一致及target编号不一致产生。
- v7-appcompat\res\values-v21\themes_base.xml:139: error: Error: No resource found that matches
- appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the gi
- appcompat_v7/res/values-v21/themes_base.xml No resource found that matches the given name
- appcompat_v7/res/values-v21/themes_base.xml No resource found that matches the given name
- appcompat_v7/res/values-v21/themes_base.xml No resource found that matches the given name的解决方法
- appcompat_v7/res/values-v21/themes_base.xml No resource found that matches the given name
- appcompat_v7/res/values-v21/themes_base.xml No resource found that matches the given name: androidXX
- appcompat_v7/res/values-v21/themes_base.xml No resource found that matches the given name
- appcompat_v7\res\values-v21\themes_base.xml:158: error: Error: No resource
- 升级android sdk到5.0,创建项目类似错误:appcompat_v7\res\values-v21 \themes_base.xml:191: error: Error: No resour
- AppCompat v7 No resource found that matches the given 错误
- \res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with
- Hello World Android App, Error: workspace\appcompat_v7\res\values-v21\styles_base.xml No resource fo
- 解决error: Error retrieving parent for item: No resource found that matches the given name 'AppCompat'
- 解决No resource found that matches the given name :Theme.AppCompat.Light error: Error retrieving paren
- 创建helloWorld app,报错workspace\appcompat_v7\res\values-v21\styles_base.xml No resource found that matc
- Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.A
- error:No resource found that matches the given name 'Theme.AppCompat.Light'
- Linux 文件系统结构介绍[图解]
- POJ1003 水题不解释
- Postgresql9.4.4 Install&Configure
- Puppet概述
- 苹果推送机制APNs(一)
- v7-appcompat\res\values-v21\themes_base.xml:139: error: Error: No resource found that matches
- base64原理解析
- Tomcat源码iOS
- Activemq 启动错误 我的解决办法
- 统计数字
- LeetCode 83 - Remove Duplicates from Sorted List
- SIP之旅1——注册
- 继承 子类对父类方法的覆盖 构造方法的继承 super
- 输出随机数字验证码图片