Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android-Studio ActionBar sherlock error with gradle

Though i have imported and added ActionBar Sherlock to my project, I am not able to compile the project. I get the following error:

Gradle: No resource found that matches the given name (at 'theme' with value '@style/Theme.Sherlock').

How do I solve this?? Please help...

like image 357
Sudeep Avatar asked Nov 02 '22 21:11

Sudeep


1 Answers

There is some bug in Android Studio which doesn't handle library dependencies well while exporting gradle file. You can manually edit library dependencies by any one of the following method.

1) For instance, given to following structure:

MyProject/

  • app/
  • libraries/
    • lib1/
    • lib2/

We can identify 3 projects. Gradle will reference them with the following name:

  1. :app
  2. :libraries:lib1
  3. :libraries:lib2

The :app project is likely to depend on the libraries, and this is done by declaring the following dependencies:

dependencies {
    compile project(':libraries:lib1')
}

2) Or you do do File -> Project Structure -> Modules There you will find dependencies tab, Click on it and manually add libraries by pressing on "+" button.

For Sherlock, may be you want to delete their test directory, or add the junit.jar file to the classpath

like image 61
Shakti Malik Avatar answered Nov 11 '22 12:11

Shakti Malik