首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >导入android-support-v7-appcompat到eclipse时面临的错误

导入android-support-v7-appcompat到eclipse时面临的错误
EN

Stack Overflow用户
提问于 2015-01-06 16:00:42
回答 1查看 456关注 0票数 0

我所做的:

  1. 我将android-support-v7-appcompat作为库项目导入eclipse
  2. 我得到下面的错误,我如何解决这个问题?

错误:

代码语言:javascript
复制
E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v17\styles_rtl.xml:70: error: Error: No resource found that matches the given name: attr 'android:textAlignment'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Dialog'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light.Dialog'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v11\themes_base.xml:338: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v14\themes_base.xml:29: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v11\themes_base.xml:345: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v14\themes_base.xml:37: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v11\themes_base.xml:352: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v14\themes_base.xml:45: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v11\themes_base.xml:359: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v14\themes_base.xml:53: error: Error: No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:202: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:212: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Light'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:205: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:219: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.ActionBar'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:223: error: Error retrieving parent for item: No resource found that matches the given name 'android:ThemeOverlay.Material.Dark.ActionBar'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:81: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:83: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:84: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:82: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:79: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:80: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:118: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:120: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:121: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:119: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:116: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:117: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:155: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:157: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:158: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:156: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:153: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:154: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:192: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2015-01-06 21:27:26 - android-support-v7-appcompat] 
[2015-01-06 21:27:26 - android-support-v7-appcompat] E:\Workspaces\Workspace-7\android-support-v7-appcompat\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

更新

我删除了V4库,现在我得到了下面的错误,但是上面的错误被解决了

代码语言:javascript
复制
error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
EN

回答 1

Stack Overflow用户

发布于 2015-01-06 16:14:21

自己解决了

  1. 右键单击appcompat_v7库并选择“属性”
  2. 现在,点击Android选项,
  3. 将Project Build Path设置为Android5.0 (API级别21)
  4. 应用更改。
  5. 现在清理+构建appcompat_v7库和您的项目
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27802379

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档