在更改源和建筑摇篮的机器人工作室(I / O preVIEW)AI - 130.677228构建失败,错误如下:
After changes to source and building with gradle in Android Studio (I/O preview) AI - 130.677228 the build fails with the following error:
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugAidl'.
> No signature of method: com.android.ide.common.internal.WaitableExecutor.waitForTasks() is applicable for argument types: () values: []
Possible solutions: waitForAllTasks()
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'.
第二次运行构建的构建将取得成功。
The second time running a build the build will succeed.
使用摇篮包装与1.6版本
Using a gradle wrapper with version 1.6
这真的很烂,因为它做了很长的构建(非增量)后失败的第一次。
This really sucks because it does a long build (non-incremental) after it fails the first time.
有没有办法没有这个故障?
Is there a way to not have this failure?
编辑,包括build.gradle
EDIT to include build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
task wrapper(type: Wrapper) {
gradleVersion = '1.6'
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android {
compileSdkVersion "Google Inc.:Google APIs:17"
buildToolsVersion "17"
defaultConfig {
minSdkVersion 11
targetSdkVersion 17
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
链接发布在谷歌code:https://$c$c.google.com/p/android/issues/detail?id=56158
我不知道这是怎么可能的。它看起来像你有摇篮插件本身和它的依赖,提供了WaitableExecutor类之间的不匹配。
I'm not sure how this is possible. It looks like you have a mismatch between the Gradle plugin itself and its dependencies that provides the WaitableExecutor class.
不过你提到的摇篮1.5,这是一个问题。
However you mention Gradle 1.5 and this is a problem.
该插件的版本0.3是与摇篮1.3-1.4兼容 上周新版本发布,0.4与1.6摇篮兼容+
The plugin version 0.3 was compatible with Gradle 1.3-1.4 The new version release last week, 0.4 is compatible with Gradle 1.6+
请确保您使用的0.4,新版本的摇篮。
Make sure you use 0.4 and the new Gradle version.