欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

程序员文章站 2022-05-19 10:51:42
...
IDEA 安装阿里java规约插件报错:
set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

如图:

idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for
idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

规约插件呈现灰色,正常情况下应该会有图标,我看别人的是这样的…

idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

为什么其他插件能正常使用,而阿里规约插件不行呢,2017和2019版本我都尝试了一下,一样的问题,同事IDEA跟我的版本一致,却可以正常使用,我只想说:

idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

什么情况会加载规则失败呢,除非找不到路径,我联想到了以前安装软件时,因为中文或者符号安装失败的原因,于是往下翻了翻,果然,答案来了:

idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

C盘原路径:

idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

IDEA 默认将配置文件放在C盘用户目录下的,而我正好用了符号,导致无法解析该路径,如何解决呢,很简单,给IDEA配置文件换个地方,可以参考下面这个老哥博客链接:
https://www.cnblogs.com/L1079991001/p/10528290.html

注意:如果你使用了自定义虚拟机配置的 jar**,配置文件迁移或者移动到回收站再移动回来,**会失效,最好先备份:
idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for
idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for
更换配置后,重新启动:
idea 插件报错:set java/ali-pmd not found for java.lang.Throwable: rule set java/ali-pmd not found for

图标点亮,ok,开始写BUG吧。