解决 File won‘t be refreshed because there were errors during analysis

原文链接:https://community.sonarsource.com/t/sonarlint-error-during-analysis-with-latest-intellij-and-remote-sonarqube-server/13440/7

我用百度翻译翻译了下。
就是说我的电脑JDK是1.8
但是我的IDEA运行时环境用的是idea自带的jdk(默认是jdk11) 。然后SonarLink用的是idea的jdk,而不是我电脑的jdk8导致出错

解决方案是什么?这里也给了。就是下载一个插件设置,是IDEA默认的更改IDEA默认的JDK(链接

好了,上面的原因以及人家的解决方案。但是很多人估计也没想管这么多。只想解决问题:

好,下面是实际解决问题的操作步骤:

  1. 安装插件: Choose Runtime解决 File won‘t be refreshed because there were errors during analysis
  2. 快捷键 Ctrl+shift+a输入choose,选择choose runtime 会loadingruntimelist,等会儿 解决 File won‘t be refreshed because there were errors during analysis
  3. 看到下面的runtime 选择系统的那个JDK。然后idea会重启,问题能够得到解决(但是:选择jdk8以后,idea的界面会变得不是那么美观。感觉分辨率差点。所以我又回去了。等需要sonar扫描的时候再操作一遍)
  4. 解决 File won‘t be refreshed because there were errors during analysis

完结
这种问题我在百度上搜,有个解决方案是降低IDEA版本。但是代价太大了。然后我在stackflow上找到了解决方案。我这蹩脚英语配合百度翻译谷歌自带的翻译。还可以哈。能够解决实际问题