简体   繁体   中英

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

[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. What you need to do is "import" the library as a full project along with its resources so it is another project in 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

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

  2. You have not imported the library and just copied the jar file into the libs folder of your project directory.

Make sure, you check both of the above issues and let me know if I can help you further..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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