当前位置: 动力学知识库 > 问答 > 编程问答 >

actionbarsherlock - 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 sturcture from the previous release.

I m trying to import the Actionbar sherlock in my project but not succeeded since 4 hours.

I have tried this

Problems importing project into Android Studio regarding ActionBarSherlock

please help me.

Thank you in advance

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: