我正在尝试在var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.fillRect(0, 0, 100, 100);
ctx.canvas.addEventListener('mousedown', function(evt) {
document.getElementById('canvas').remove();
}, false);
中构建一个gradle 2.11
项目,并且我一直将此错误反馈给我。我在build.gradle文件中设置了Intellij
但是当我运行flatDir
时,这个错误仍然存在。
gradle idea
错误
buildscript {
repositories {
flatDir {
dirs "$rootProject.rootDir/lib/gradle-plugins"
}
}
dependencies {
classpath "gradle.plugins:prompt-version-plugin:1.0.0"
classpath "gradle.plugins:properties-plugin:1.0.0"
}
}
idea {
module {
/*
* If you omit [ ] around, it fails with: Cannot change configuration ':provided' after it has been resolved
* This is due Gradle 2.x using Groovy 2.3 that does not allow += for single elements addition.
* More: https://discuss.gradle.org/t/custom-provided-configuration-not-working-with-gradle-2-0-rc2-in-multi-project-mode/2459
*/
scopes.PROVIDED.plus += [configurations.provided]
downloadJavadoc = true
downloadSources = true
}
}