加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

v7-appcompat\res\values-v21\themes_b

发布时间:2020-12-16 06:08:51 所属栏目:百科 来源:网络整理
导读:v7-appcompatresvalues-v21themes_base.xml:139: error: Error: No resource found that matches the given name android-support-v7-appcompatresvalues-v21themes_base.xml:139: error: Error: No resource found that matches the given name: attr
 

v7-appcompatresvalues-v21themes_base.xml:139: error: Error: No resource found that matches the given name

android-support-v7-appcompatresvalues-v21themes_base.xml:139: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
android-support-v7-appcompatresvalues-v21themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
android-support-v7-appcompatresvalues-v21themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
android-support-v7-appcompatresvalues-v21themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
android-support-v7-appcompatresvalues-v21themes_base.xml:144: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.
android-support-v7-appcompatresvalues-v21themes_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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读