我在我的 android studio 项目中使用 actionbarsherlock 模块时遇到问题。我成功地将其作为项目中的库,但我无法从中导入。
“import com.actionbarsherlock ...”只是工作。我的 Settings.gradle 看起来像这样:
include ':app', ':actionbarsherlock'
actionbarsherlock 模块与“App”、“.idea”和“build”位于同一文件夹中。
可能是位置问题,还是我还缺少其他东西?
最佳答案
include
settings.gradle 中的语句只是将该项目作为子项目包含在 Gradle 构建中。然后,您需要将该项目作为依赖项包含在您的 build.gradle 中。
dependencies {
compile project(':actionbarsherlock')
}
关于android - 在 android studio 中使用模块导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26324307/