Inspect Code),我总是遇到这个错误: 11:35:28 IllegalArgumentException:-6ren">
gpt4 book ai didi

android - SonarQube 社区插件中的 "IllegalArgumentException"

转载 作者:搜寻专家 更新时间:2023-11-01 08:43:54 25 4
gpt4 key购买 nike

最近,当我尝试在 Android Studio 中分析代码时(Analyze > Inspect Code),我总是遇到这个错误:

11:35:28 IllegalArgumentException: Argument for @NotNull parameter 'sonarServerName' of org/intellij/sonar/persistence/SonarServers.get must not be null

在其他项目中它工作正常。单击 IllegalArgumentException 链接时,将显示此屏幕:​​

IDE Fatal Error: Exception in SonarQube Community plugin

显然,我不想禁用插件。

此处复制的异常文本:

Argument for @NotNull parameter 'sonarServerName' of org/intellij/sonar/persistence/SonarServers.get must not be null
java.lang.IllegalArgumentException: Argument for @NotNull parameter 'sonarServerName' of org/intellij/sonar/persistence/SonarServers.get must not be null
at org.intellij.sonar.persistence.SonarServers.get(SonarServers.java)
at org.intellij.sonar.analysis.DownloadIssuesTask.from(DownloadIssuesTask.java:53)
at org.intellij.sonar.analysis.SonarQubeInspectionContext.performPreRunActivities(SonarQubeInspectionContext.java:143)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase.initializeTools(GlobalInspectionContextBase.java:340)
at com.intellij.codeInspection.ex.GlobalInspectionContextImpl.runTools(GlobalInspectionContextImpl.java:339)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase$6.run(GlobalInspectionContextBase.java:283)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:449)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase.performInspectionsWithProgress(GlobalInspectionContextBase.java:280)
at com.intellij.codeInspection.ex.GlobalInspectionContextBase$4.run(GlobalInspectionContextBase.java:241)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:405)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)

有人遇到过这个问题吗?问题出在哪里,我该如何解决?

最佳答案

您应该根据 README 配置 SonarQube 服务器以使用来自插件库:

After the installation, you first of all need to configure the connection to your Sonar server. This is done per project and/ or module. You can use a remote server or a local one on your machine.

In your IDE go to Preferences -> SonarQube.

In your IDE go to Preferences -> SonarQube

Click Add, enter the address of your Sonar server and the credentials (if needed) and click OK.

enter image description here

关于android - SonarQube 社区插件中的 "IllegalArgumentException",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30234240/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com