gpt4 book ai didi

java - Gradle Build 找不到 testSrcDirs

转载 作者:行者123 更新时间:2023-12-02 11:10:48 26 4
gpt4 key购买 nike

我尝试为现有 Java 项目运行 Gradle 构建,但收到以下错误,该错误似乎与我的项目无关。

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':myProject:test'.
> Could not get unknown property 'testSrcDirs' for task ':myProject:test' of type org.gradle.api.tasks.testing.Test.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

如何修复此错误?

最佳答案

如果您在此页面搜索 testSrcDir 异常,请尝试将 gradle clover 插件 jar 从 2.0.1 更新到 latest versions .

如果无法更新版本,您也可以尝试建议的解决方法 here

test {
ext.testSrcDirs = project.sourceSets.test.java.srcDirs
}

关于java - Gradle Build 找不到 testSrcDirs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50638549/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com