在android eclipse的第一个项目中出现了很多错误

时间:2014-12-29 02:23:05

标签: java android eclipse

嘿家伙我juz在eclipse上下载了android SDK,似乎有无限错误,因为这是我的第一次,我不知道从哪里开始plz帮助

[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:79: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:80: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:118: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:120: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:121: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:119: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:116: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:117: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:155: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:157: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:158: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:156: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:153: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:154: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:192: error: Error: No resource found that matches the given name: attr 'android:colorAccent'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
[2014-12-29 07:49:08 - appcompat_v7] 
[2014-12-29 07:49:08 - appcompat_v7] C:\Users\renu\workspace\appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.
[2014-12-29 07:49:08 - appcompat_v7] 

这些只是少数几百万的错误

2 个答案:

答案 0 :(得分:0)

您不应仅添加appcompat库jar。你需要做的是将库“导入”为一个完整的项目及其资源,这是eclipse中的另一个项目。

之后,将其添加到当前项目作为参考。

发生此错误是因为找不到资源。资源不与jar文件捆绑在一起

答案 1 :(得分:0)

这里的错误可能是由于以下原因之一:

  1. 您正在项目中使用appcompat-v7库,而您忘记在eclipse项目中双击它来打开此库

  2. 您尚未导入库,只是将jar文件复制到项目目录的libs文件夹中。

  3. 请务必检查上述两个问题,并告诉我是否可以为您提供帮助..