简体   繁体   English

android eclipse中的第一个项目期间出现很多错误

[英]lot of errors during first project in android eclipse

hey guys i juz downloaded the android SDK on eclipse and there seem to be infinite errors and since this is my first time , i hav no clue where to start plz help 大家好,我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] 

these are only a few of the errors there are a million more 这些只是少数错误,还有百万种错误

You should not add the appcompat library jar only. 您不应仅添加appcompat库jar。 What you need to do is "import" the library as a full project along with its resources so it is another project in eclipse. 您需要做的是将库及其资源作为一个完整项目“导入”,因此它是eclipse中的另一个项目。

After that you add it to your current project as a reference. 之后,将其添加到当前项目中作为参考。

This error is happening because it can not find resources. 发生此错误是因为找不到资源。 Resources are not bundled with the jar file 资源未与jar文件捆绑在一起

The errors here maybe due to one of the following reasons : 该错误可能是由于以下原因之一:

  1. You are using appcompat-v7 library in your project and you forgot to open this library by double clicking on it in eclipse project 您正在项目中使用appcompat-v7库,却忘记了在eclipse项目中双击打开该库

  2. You have not imported the library and just copied the jar file into the libs folder of your project directory. 您尚未导入库,只是将jar文件复制到项目目录的libs文件夹中。

Make sure, you check both of the above issues and let me know if I can help you further.. 确保您同时检查了上述两个问题,并让我知道是否可以进一步帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM