gpt4 book ai didi

gradle - Gradle构建期间错误的含义

转载 作者:行者123 更新时间:2023-12-03 03:57:15 24 4
gpt4 key购买 nike

尝试使用gradle构建时出现错误。

这个错误是什么意思?

E:\intellij-project\MyProject>gradle build
> Task :compileJava FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':compileJava'.
> Cannot specify -processorpath or --processor-path via `CompileOptions.compilerArgs`. Use the `CompileOptions.annotationProcessorPath` property instead.

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

Get more help at https://help.gradle.org

BUILD FAILED in 1s
1 actionable task: 1 executed

E:\intellij-project\MyProject>

最佳答案

这是Gradle 4.5中所做的更改,成为Gradle 5.0中的重大更改:

You should not put annotation processors on the compile classpath or declare them with the -processorpath compiler argument.

They should be added to the annotationProcessor configuration instead. If you don’t want any processing, but your compile classpath contains a processor unintentionally (e.g. as part of a library you depend on), use the -proc:none compiler argument to ignore it.


参见 upgrade documentation

关于gradle - Gradle构建期间错误的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55206312/

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