简体   繁体   中英

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

I have updated Android Studio to build # 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. I have tried this:

Problems importing project into Android Studio regarding ActionBarSherlock

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 . 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...

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

and then right before that line, you should have: include ':actionbarsherlock'

Now, in your build.gradle file, include the following...

dependencies {
    compile project(':actionbarsherlock')
}

Now you should be able to build with Gradle. If you're unfamiliar with Gradle, start reading about it here: http://www.gradle.org/docs/current/userguide/userguide.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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