类型“javacompile”属性“options.compilerargumentproviders.apt$0.name”缺少输入或输出注解升级到gradle 7后出错

vlju58qv  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(700)

在升级到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 文件或其他关于去哪里找的提示。

u4vypkhs

u4vypkhs1#

对于任何有同样问题的人:正如bj所说ø嗯,apt插件是我gradle构建文件中的罪魁祸首。我去掉了普通的( id "net.ltgt.apt" )还有智能手机( id "net.ltgt.apt-idea" ),我的生成文件再次工作。

相关问题