我已经使用发布此问题的步骤将模块导入 Android Studio: Problems importing project into Android Studio about ActionBarSherlock
IDE 运行良好,但不影响构建。来自Android Studio:是否从 project.properties 中选择了库项目依赖项?
如果你使用 Gradle,project.properties 将被完全忽略。您现在不应该使用 Module Settings 添加依赖项,因为它只会更改 IDE 而不会更改基于 Gradle 的构建系统(我们将在以后的版本中修复此问题)。
我已经修改了依赖项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.