Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Imported appcompat library has errors

Tags:

java

android

xml

I recently updated my SDK, downloaded newest API 21, deleted support library because appcompat project was not present, installed it, and I imported appcompat, just like Google wants me to do it (copied to my workspace, added every jar to build path, configured build path etc.).

Now I am getting errors in android-support-v7-appcompat -> res -> values-v21 -> styles_base.xml, at line:

<style name="Base.Widget.AppCompat.ActionButton"
        parent="android:Widget.Material.ActionButton">
</style>

The error is:

error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.

Any solutions?

like image 582
Adam Staszak Avatar asked Sep 30 '22 13:09

Adam Staszak


2 Answers

go in the project->properties of your appcompat project
change target=android-19 to target=android-21
all your projects using this library also need to be on target=android-21

like image 137
Theo Jouret Avatar answered Oct 02 '22 16:10

Theo Jouret


Right-Click on the appcompat project folder and open "properties". Go to "Android" section and check "Android 5.0" as the project build target apply it and enjoy :)

like image 25
Hamidreza Hosseinkhani Avatar answered Oct 02 '22 15:10

Hamidreza Hosseinkhani