gpt4 book ai didi

android - 如何将 Action Bar Sherlock 导入到 gradle 项目?

转载 作者:IT老高 更新时间:2023-10-28 22:25:39 25 4
gpt4 key购买 nike

我已使用发布此问题的步骤将模块导入 Android Studio: Problems importing project into Android Studio regarding ActionBarSherlock

IDE 运行良好,但不影响构建。来自 Android Studio: Are Library Project dependencies picked from project.properties?

If you use Gradle, project.properties is completely ignored. You should not use the Module Settings to add dependencies now as it only changes the IDE but not the Gradle based build system (we'll fix this in later versions).

我已经修改了 build.gradle

的依赖
dependencies {
compile files('libs/android-support-v4.jar')
compile project(":ActionBarSherlock")
}

但它现在构建打印不同的错误: Gradle :

FAILURE: Build failed with an exception.
* Where:
Build file '...PATH.../PROJECT_NAME/PROJECT_NAME/build.gradle' line: 13
* What went wrong:
A problem occurred evaluating project ':PROJECT_NAME'.
> Project with path ':ActionBarSherlock' could not be found in project ':PROJECT_NAME'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

最佳答案

此答案已弃用:请查看 AppCompat 作为替代品!

dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.android.support:support-v4:18.0.+'
}

发现于 the ActionBarSherlock siteActionBar Sherlock with Android Studio 0.2.2

ABS 已经发布了他们的 aar。

还有一个在 github 上使用它的示例:

https://github.com/JakeWharton/ActionBarSherlock-Gradle-Sample

支持库版本号并不重要,请确保您始终使用项目允许的最新版本。整个支持 jar 的实际包含不是可选的

关于android - 如何将 Action Bar Sherlock 导入到 gradle 项目?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16854801/

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