Error importing project in eclipse

Asked

Viewed 819 times

2

I am trying to import a project I have 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’ve already added the library to the project appcompat v7 as the official website sends, but the error of the project does not disappear.

1 answer

1

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:

  1. Menu File > Import
  2. Look for android-sdk\extras\android\support\v7
  3. Choosing appcompat
  4. Menu Project > properties > Android
  5. In the section library, click on Add
  6. 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 importare 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?

  • @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`.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.