机器人工作室的ActionBar福尔摩斯误差摇篮福尔摩斯、误差、摇篮、机器人

2023-09-06 10:21:37 作者:哥、早已放手

虽然我已经进口并添加动作条福尔摩斯到我的项目,我不能编译该项目。我得到以下错误:

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

摇篮:没有资源的发现,匹配给定的名称(在主题与   值'@风格/ Theme.Sherlock)。

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

我要如何解决这个问题?请帮助...

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

推荐答案

有一个在Android的工作室一些bug不处理库的依赖以及在导出摇篮文件。 可以通过以下方法中的任何一个手动编辑库的依赖。

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)     例如,给予以下结构:

1) For instance, given to following structure:

MyProject的/

MyProject/

应用程序/ 在库/ 在LIB1 / LIB2 / app/ libraries/ lib1/ lib2/

我们可以识别3个项目。摇篮会引用它们具有以下名称:

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

:应用程序 :库:LIB1 :库: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),或者你做 文件 - >项目结构 - >模块 你会发现有相关性选项卡,点击它,并通过+按钮pressing手动添加库。

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.

有关福尔摩斯,可能要删除他们的测试目录或文件的junit.jar添加到类路径

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