values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the

Eclipse报values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name ‘Theme.AppCompat.Light.DarkActionBar’

如下:

*:\eswp\HelloAndroid\res\menu\main.xml:6: error: No resource identifier found for attribute 'showAsAction' in package 'com.example.helloandroid'
*:\eswp\HelloAndroid\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
*:\eswp\HelloAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
*:\eswp\HelloAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
*:\eswp\HelloAndroid\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
*:\eswp\HelloAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
*:\eswp\HelloAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
*:\eswp\HelloAndroid\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
*:\eswp\HelloAndroid\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
*:\eswp\HelloAndroid\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

那是因为缺少appcompat_v7,方法,下载appcompat_v7(下载地址:appcompat_v7)工程并导入到工程空间,clear一下项目。如果你的项目目标版本过低,接着就会报:

*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:87: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:88: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:134: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:138: error: Error: No resource found that matches the given name: attr 'android:colorButtonNormal'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:136: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:137: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:135: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:132: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:133: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:142: error: Error: No resource found that matches the given name: attr 'android:window*levation'.
*:\eswp\android-support-v7-appcompat\res\values-v21\themes_base.xml:146: error: Error: No resource found that matches the given name: attr 'android:window*levation'.

方法,把项目目标版本改成21或更高,比如23,最终解决问题。

由于公司最近非常忙,写得比较简单,以后有时间再补充详细解决方案,不过思路是对的,注意点就是你的项目工程版本,不要只看appcompat-v7项目版本。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值