Qadir Hussain
Qadir Hussain

Reputation: 8856

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

Upvotes: 0

Views: 967

Answers (1)

Alex Fu
Alex Fu

Reputation: 5529

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

Upvotes: 1

Related Questions