我一直在使用遗留项目的构建脚本,在使用Gradle 2.13时,我得到了以下错误。
myhost jthoms$ gradle clean build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.
FAILURE: Build failed with an exception.
* Where:
Build file '/<my-project>/build.gradle' line: 10
* What went wrong:
A problem occurred evaluating root project 'com.mycompany.myorg.myproject'.
> org/gradle/internal/metaobject/MethodMixIn
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.494 secs我的build.gradle文件如下所示:
buildscript {
repositories {
maven { url 'http://<my-nexus-repo>/' }
}
dependencies {
classpath 'com.bmuschko:gradle-clover-plugin:2.1.2'
}
}
apply plugin: 'com.bmuschko.clover'
// more build stuff below irrelevant to error line.我的构建失败了,那么如何修复这个错误呢?
我解决了这个错误,但是我找不到任何与错误输出中提到的类相关的东西,所以我想我应该在这里分享我的发现。
发布于 2017-08-03 06:58:09
我发现this thread也有类似的错误。在帖子中,@bmuschko建议升级到更新版本的Gradle。对我来说,从Gradle版本2.13升级到3.5.1就像一个魔咒。
https://stackoverflow.com/questions/45472276
复制相似问题