简体   繁体   English

如何在最新版本的Android Studio中导入Actionbar Sherlock库

[英]How to import Actionbar Sherlock library in new latest version of Android Studio

I have updated Android Studio to build # AI-130.72944. 我已经更新了Android Studio以构建#AI-130.72944。 I have noticed that it has some how different file structure from the previous release. 我注意到它与以前的版本有一些不同的文件结构。

I m trying to import the Actionbar Sherlock in my project but not succeeded. 我试图在我的项目中导入Actionbar Sherlock,但未成功。 I have tried this: 我已经试过了:

Problems importing project into Android Studio regarding ActionBarSherlock 将与ActionBarSherlock有关的项目导入Android Studio时出现问题

If your ActionBarSherlock library doesn't contain a build.gradle file, grab it from here: https://github.com/JakeWharton/ActionBarSherlock/blob/dev/actionbarsherlock/build.gradle . 如果您的ActionBarSherlock库不包含build.gradle文件,请从此处获取它: https : //github.com/JakeWharton/ActionBarSherlock/blob/dev/actionbarsherlock/build.gradle Save this file into the root directory of the library. 将此文件保存到库的根目录中。

If you're referencing the library from outside of your project directory, you should define where the library is in settings.gradle , like so... 如果要从项目目录之外引用库,则应定义库在settings.gradle ,就像这样...

project(':actionbarsherlock').projectDir = new File('/path/to/library')

and then right before that line, you should have: include ':actionbarsherlock' 然后在那行之前,您应该具有: include ':actionbarsherlock'

Now, in your build.gradle file, include the following... 现在,在您的build.gradle文件中,包括以下内容...

dependencies {
    compile project(':actionbarsherlock')
}

Now you should be able to build with Gradle. 现在您应该可以使用Gradle进行构建。 If you're unfamiliar with Gradle, start reading about it here: http://www.gradle.org/docs/current/userguide/userguide.html 如果您不熟悉Gradle,请在这里开始阅读: http : //www.gradle.org/docs/current/userguide/userguide.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM