Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse's errors of the Android Design Support library

I'm trying to import into eclipse the library "android.support.design", but after importation I get a few errors:

/design/res/values/styles.xml:21: error: Error: No resource found that matches the given name: attr 'backgroundTint'.
/design/res/values/styles.xml:23: error: Error: No resource found that matches the given name: attr 'elevation'.
/design/res/values/styles.xml:34: error: Error: No resource found that matches the given name: attr 'elevation'. 
/design/res/values/styles.xml:56: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'.
/design/res/values/styles.xml:59: error: Error: No resource found that matches the given name: attr 'textAllCaps'.
/design/res/values/styles.xml:67: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.      
/design/res/values/styles.xml:71: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.     
/design/res/values/styles.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'.     
/design/res/values/styles.xml:91: error: Error: No resource found that matches the given name: attr 'elevation'. 
/design/res/values/styles.xml:103: error: Error: No resource found that matches the given name: attr 'elevation'.  
/design/res/values/styles.xml:111: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Display1'. 
/design/res/values/styles.xml:21: error: Error: No resource found that matches the given name: attr 'backgroundTint'.
/design/res/values/styles.xml:23: error: Error: No resource found that matches the given name: attr 'elevation'.
/design/res/values/styles.xml:34: error: Error: No resource found that matches the given name: attr 'elevation'.  
/design/res/values/styles.xml:56: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'.
/design/res/values/styles.xml:59: error: Error: No resource found that matches the given name: attr 'textAllCaps'.
/design/res/values/styles.xml:67: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
/design/res/values/styles.xml:71: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Caption'.
/design/res/values/styles.xml:80: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Button'.
/design/res/values/styles.xml:91: error: Error: No resource found that matches the given name: attr 'elevation'.
/design/res/values/styles.xml:103: error: Error: No resource found that matches the given name: attr 'elevation'.
/design/res/values/styles.xml:111: error: Error retrieving parent for item: No resource found that matches the given name 'TextAppearance.AppCompat.Display1'.

How can I fix? Thanks.

like image 489
alex193a Avatar asked Feb 09 '23 23:02

alex193a


2 Answers

According to this Android Developer Blog for Android Design Support Library, Support v4 and AppCompat Support Libraries are the dependencies to build the Design Support library. http://android-developers.blogspot.com/2015/05/android-design-support-library.html

So in Eclipse, Right Click on the android support design library project -> Properties -> Android, go to Library section on the bottom, and click Add.. to add your AppCompat Library to the project.

like image 151
Sam C Avatar answered Feb 15 '23 11:02

Sam C


add this in your build.gradle

dependencies {

    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:design:22.2.0'
    compile 'com.android.support:support-v4:22.2.0'
}

in eclipse: (add all above jar)

Your Project -> right click -> Properties -> Java Build Path -> Libraries -> Add Jar -> yourjar.jar
like image 21
Dhaval Parmar Avatar answered Feb 15 '23 10:02

Dhaval Parmar