4

before this error my all application are going fine but when i took new project suddenly it is showing error in my appcompat and in my project in build path in android dependency it is showing error.Pleas give me some solution what should I do. and also give me more clarity of android dependency and appcompat library file. it is showing this error:-

appcompat_v7/res/values-v21/themes_base.xml:194: error: Error: No resource found that matches the given name: attr 'android:colorControlActivated'.
appcompat_v7/res/values-v21/themes_base.xml:195: error: Error: No resource found that matches the given name: attr 'android:colorControlHighlight'.
appcompat_v7/res/values-v21/themes_base.xml:193: error: Error: No resource found that matches the given name: attr 'android:colorControlNormal'.
appcompat_v7/res/values-v21/themes_base.xml:190: error: Error: No resource found that matches the given name: attr 'android:colorPrimary'.
appcompat_v7/res/values-v21/themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:colorPrimaryDark'.

thanks

Remees M Syde
  • 2,564
  • 1
  • 19
  • 42
Rohit Bandil
  • 192
  • 1
  • 2
  • 9
  • You should check [this StackO-Post](http://stackoverflow.com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-given-name-attr-andro/26449172#26449172) – reVerse Oct 31 '14 at 14:39

4 Answers4

2

finally my error solveed but that is not exact solution what i wanted. what i did i have created one new project and took min sdk version is 15 bcoz action bar feature is present in 15 and further api .i think that feature introduced in 11 api .so i have taken new project with min sdk version and then no need of appcompat library now no error is coming... but i solved this problem by alternative solution but i also want answer of my question.

Rohit Bandil
  • 192
  • 1
  • 2
  • 9
1

you have not added the appcompat_v7 library properly

check whether you have the library in Right click your project->properties->select android->appcompact lib (this library should be refered you are missing this one) So follow these Steps:-

1)Right-click your project and select Properties.

2)In the category panel on the left side of the dialog, select Android.

3)In the Library pane, click the Add button.

4)Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.

5)In the properties window, click OK.

If you don't see anything when you click Add button(step 3) ,then you should refer this link :-https://developer.android.com/tools/support-library/setup.html , in that link read adding libraries with resources and the follow the steps .

OR

Make sure you have downloaded the Android Support Library using the SDK Manager.
Create a library project and ensure the required JAR files are included in the project's build path:
   1) Select File > Import.

    2)Select Existing Android Code Into Workspace and click Next.
    Browse to the SDK installation directory and then to the Support Library folder. 
    For example, if you are adding the appcompat project, 
    browse to <sdk>/extras/android/support/v7/appcompat/.

    3)Click Finish to import the project. For the v7 appcompat project,
   you should now see a new project titled android-support-v7-appcompat.

   4)  In the new library project, expand the libs/ folder,
   right-click each .jar file and select Build Path > Add to Build Path. 
   For example, when creating the the v7 appcompat project, 
   add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.
   5) Right-click the library project folder and select Build Path > Configure Build  Path.

    6) In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
    Uncheck Android Dependencies.
   7) Click OK to complete the changes.
user3173628
  • 182
  • 5
  • i have already checked . i have added appcompat library and in android dialog appcompat library is showing and right singn is also there. – Rohit Bandil Nov 02 '14 at 15:17
  • the error is appcompat library it is showing cross mark i think first thist library should be correct.......plz give some solution – Rohit Bandil Nov 03 '14 at 05:06
0

Yes this thing was coming to me too since too days. Go to your Project Properties and select that android api version that all things is downloaded with you in sdk for example in my case api 17 I choose and in sdk I have everything installed. Your project properties

I also did one thing extra in (image) bottom you can see check box (Is Library) I removed the refrence appcompat_v7 and click Apply.

After this everyting work with me like charm..... At last I come to the point that

Naveed
  • 403
  • 3
  • 11
0

appcompat_v7 -> project.properties ,I have changed the target =19 to target=21 . Then refreshed the project ,that fixed my issue.

Reference: Got an error while building a project in new workspace

Community
  • 1
  • 1
codeX
  • 4,842
  • 2
  • 31
  • 36