I don’t usually develop for Android, but I’ll try to help.
I first noticed the attribute parent
of your code does not have the prefix @style
. See how it’s in documentation:
<style name="CustomActionBarTheme"
parent="@style/Theme.AppCompat.Light">
If this does not work check if you have actually taken the steps below to add the library appcompat
, as suggested in an OS response:
- Menu
File > Import
- Look for
android-sdk\extras\android\support\v7
- Choosing
appcompat
- Menu
Project > properties > Android
- In the section
library
, click on Add
- Choosing
appCompat
If it still does not work, as suggested in other response from the OS, check that the API version is at least level 11 and that import
are correct. According to the documentation, packages change before and after level 11.
If again it does not work, the last source also suggests changing the build target of the project for at least the version 4.0.3
in your project settings in Properties > Android
.
I have tried all the options and nothing, the project was created for 2.2, including I have already created another project because eclipse already automatically creates the project appcompat v7, but it does not take the error of the project. There is no way to recover this project anyway?
– War Lock
@Warlock You would need to look at all the project settings to verify the source of the problem. You can do this if you want. First configure Eclipse to display the project configuration files (
*. resources
). You can see how to do this at this link. Do this for the project that works and what doesn’t work, then you can look at the settings and see what the difference is. Start with.project
, then the.classpath
and finally all of the ``. Settings folder`.– utluiz