升级到 Gradle 7.0 并进行构建后,我遇到以下失败:
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Some problems were found with the configuration of task ':compileJava' (type 'JavaCompile').
- Type 'JavaCompile' property 'options.compilerArgumentProviders.apt$0.name' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
- Type 'JavaCompile' property 'options.compilerArgumentProviders.apt$0.publicType' is missing an input or output annotation.
Reason: A property without annotation isn't considered during up-to-date checking.
Possible solutions:
1. Add an input or output annotation.
2. Mark it as @Internal.
Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#missing_annotation for more details about this problem.
* 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.
我尝试过--stacktrace
但没有从中得到任何帮助。
这里的事情是,我不确定在哪里寻找解决这个问题的方法,因为它没有提到任何一行build.gradle
文件或其他一些关于在哪里查找的提示。
对于任何有同样问题的人:正如所指出的Bjørn https://stackoverflow.com/users/1703730/bj%C3%B8rn-vester,apt 插件是我的 Gradle 构建文件中的罪魁祸首。我删除了通用的(id "net.ltgt.apt"
)和 IntelliJ 一个(id "net.ltgt.apt-idea"
),我的构建文件再次工作了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)