Search code examples
androidintellij-ideaactionbarsherlock

Error on Adding ActionBarSherlock in Intellij-Idea 13


After adding the library in project by all tutorial I have an error in style.xml

Error: No resources found that matches the given name: attr 'switchStyle'
Error: No resources found that matches the given name: attr 'textAppearance'

In Eclipse i can choose "clean project" and this problem disappear until next change in style.xml

<style name="AppTheme" parent="Theme.Sherlock.Light">
        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
        <item name="switchStyle">@style/switch_light</item>
        <item name="textAppearance">@style/TextAppearance</item>
        <item name="android:actionBarStyle"  tools:ignore="NewApi">@style/Widget.Styled.ActionBar</item>
</style>

My steps:

  • Project created in Eclipse and now imported to IntelliJ IDEA
  • Project and ActionBar SDK settings - Google Android 4.4.2
  • Manifest project settings: minSDK - 10; target SDK - 19
  • Add module to project setting (not jar - all ActionBar project by import module -> chose ActionBar folder -> create module from existing source or import from external module Eclipse)
  • Add in module dependency to support-v4
  • Add ActionBar module to dependency for Project module
  • In Facets ActionBar module is library
  • Remove from imported ActionBar module test folder
  • Rebuild project - error
  • Make project - error.

PS. Project is old, created in Eclipse without Gradle.


Solution

  • In my case problem was in dependencies of third part module from ActionBarSherlock. All trace was: - My project have dependency from ActionBarSherlock and other module which also have dependency from ABS - Project refers to style of ActionBar BUT in this third part module

    The whole thing turned out to be in my inattention