Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to build ActionBarSherlock in IntelliJ IDEA

I had included the library module ActionBarSherlock to my project. Minimal SDK version is 10, target SDK - 13 for both the projects.

But when I'm trying to build the project, I'm getting a lot of errors like:

[Library] /Users/rankor777/src/ActionBarSherlock/library/res/values-v14/abs__styles.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.

Why?

like image 746
artem Avatar asked Nov 19 '25 06:11

artem


1 Answers

  • Download ActionBarSherlock zip file and extract it next to your application module which will make use of ActionBarSherlock. Select File->Import Module from IntelliJ IDEASelect library folder under ActionBarSherlock folder and import it as a new module. It will be imported as an Android library module.
  • Open module settings of ActionBarSherlock library module and export android-support-v4.jar dependency

  • Open module settings of your application which will make use of ActionBarSherlock and add a new Module Dependency

  • Select ActionBarSherlock from the list of modules

See step by step instructions with pictures

PS:Some tutorials on the internet directs you to add android-support-v4.jar to your application’s libs folder and add as a library dependency. Since ActionBarSherlock already includes it you do not have to do it, just export it from ActionBarSherlock. If you also add android-support-v4.jar as a library to your own module you may get UNXPECTED TOP LEVEL EXCEPTION.

like image 56
Deniz Avatar answered Nov 21 '25 00:11

Deniz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!