在Eclipse中构建期间无法初始化模块TreeWalker

时间:2016-08-04 06:44:28

标签: eclipse checkstyle

我在Eclipse Mars中执行Project-Clean ...并收到以下错误

   Errors occurred during the build.
     Errors running builder 'Checkstyle Builder' on project 'MyProject'.
        cannot initialize module TreeWalker - Unable to instantiate 
        'RedundantThrows' class, it is also not possible to instantiate it as 
        com.puppycrawl.tools.checkstyle.checks.annotation.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.blocks.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.coding.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.design.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.header.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.imports.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.indentation.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.javadoc.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.metrics.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.modifier.RedundantThrows,
        com.puppycrawl.tools.checkstyle.checks.naming.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.regexp.RedundantThrows,
        com.puppycrawl.tools.checkstyle.checks.sizes.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.whitespace.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.checks.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.filters.RedundantThrows, 
        com.puppycrawl.tools.checkstyle.RedundantThrows. Please recheck that class name 
        is specified as canonical name or read how to configure short name usage 
        http://checkstyle.sourceforge.net/config.html#Packages. Please also recheck that 
        provided ClassLoader to Checker is configured correctly.

CheckStyle插件版本是6.11。 你能不能帮我搞清楚可能导致这个错误的原因。感谢。

1 个答案:

答案 0 :(得分:5)

RedundantThrows 检查来自Checkstyle的has been removed。只需从 checkstyle.xml 中删除<module>条目即可。