【问题标题】:Cannot initialize module TreeWalker during the build in Eclipse在 Eclipse 中构建期间无法初始化模块 TreeWalker
【发布时间】:2016-08-04 06:44:27
【问题描述】:

我正在 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。 您能否帮我弄清楚可能导致此错误的原因。谢谢。

【问题讨论】:

    标签: eclipse checkstyle


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-05-17
      • 2013-06-24
      • 1970-01-01
      • 2015-05-22
      • 1970-01-01
      • 1970-01-01
      • 2013-09-03
      • 2014-08-25
      相关资源
      最近更新 更多