我正在尝试在我的多项目上使用新的 gradle android 构建系统。我有依赖于它的库项目和演示项目。我有依赖块的问题。
Gradle 'demo' project refresh failed:
Could not fetch model of type 'IdeaProject' using Gradle installation '/Users/lia/Worktable/gradle/tools/external/gradle/gradle-1.6'.
Build file '/Users/lia/Worktable/screen-tester-android/demo/build.gradle' line: 43
A problem occurred evaluating project ':demo'.
A problem occurred evaluating project ':demo'.
No signature of method: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.compile() is applicable for argument types: (org.gradle.api.internal.project.DefaultProject_Decorated) values: [project ':screentester']
Possible solutions: module(java.lang.Object)
使用 gradle 1.6
设置.gradle
include ':demo', ':screentester'
演示 build.gradle 依赖块
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
compile project(':screentester')
}