Error importing project into eclipse

2

I'm trying to import a project that I've saved. However, when I import, the file style.xml , gives error in this line:

<style name="AppBaseTheme" parent="Theme.AppCompat.Light">

With the message:

  

retrieving parent for item

I have already added the appcompat v7 library to the project as the official website sends, but the project error does not disappear.

    
asked by anonymous 21.11.2014 / 21:42

1 answer

1

I do not usually develop for Android, but I'll try to help.

Firstly, I noticed that the parent attribute of your code does not have the @style prefix. Here's how it's in the documentation :

<style name="CustomActionBarTheme"
       parent="@style/Theme.AppCompat.Light">

If this does not work check that you actually performed the steps below to add the appcompat library, as suggested in an OS response :

  • Menu File > Import
  • Search for android-sdk\extras\android\support\v7
  • Choose appcompat
  • Menu Project > properties > Android
  • In the library section, click Add
  • Choose appCompat
  • If it still does not work, as suggested in other OS response , check that the API version is at least at level 11 and that% s of% s is correct. According to the documentation , packages change before and after level 11.

    If it does not work again, the last source also suggests changing the build target of the project to at least the import version of your project settings in 4.0.3 .

        
    22.11.2014 / 05:18