Android-Studio ActionBar sherlock error with gradle

前端 未结 1 609
清歌不尽
清歌不尽 2021-01-13 05:17

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 resourc

相关标签:
1条回答
  • 2021-01-13 06:03

    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

    0 讨论(0)
提交回复
热议问题