任务 ':app:ktlintAndroidTestDebugSourceSetCheck' 的 KtLint 执行失败

问题描述

我正在使用 gradle 版本 7.0.0-beta01 并遵循 this guidektlint 设置到我的项目中。但是我在运行以下命令时遇到错误

./gradlew ktlintFormat

使用 -stacktrace 等运行似乎也没有多大帮助。这是我得到的错误。非常感谢任何帮助。

Execution Failed for task ':app:ktlintAndroidTestDebugSourceSetFormat'.
> Querying the mapped value of task ':app:ktlintAndroidTestDebugSourceSetFormat' property 'reporterOutputDir' before task ':app:ktlintAndroidTestDebugSourceSetFormat' has completed is not supported

解决方法

此问题已在更高版本的 ktlint gradle 插件中修复。您可以向下到 9.2.1 或向上到 10.0.0See this issue

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...