gpt4 book ai didi

android - 在 android studio 中使用模块导入

转载 作者:行者123 更新时间:2023-12-03 06:20:12 25 4
gpt4 key购买 nike

我在我的 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com