awsmman
(Arman Markosyan)
November 8, 2023, 6:01am
1
hi there.
i have same error
my SonarQube version is = Version 9.9.2 (build 77730)
JDK version = 17
sonarqube {
androidVariant 'release'
properties {
property "sonar.projectName", "Digital-Android"
property "sonar.host.url", "https://sonar.****.am/sonarqube"
property "sonar.projectKey", "*************"
property "sonar.login", "***************"
property "sonar.sources", "./src/main/java"
property "sonar.qualitygate.wait", "true"
}
}
Who can help me?
awsmman
(Arman Markosyan)
November 8, 2023, 1:21pm
2
i have writed new post, but no any answer
Hello there,
I have integrated SonarQube into my Android project. However, when I use the .\gradlew.bat sonarqube command, I encounter an error that causes the SonarQube job to start and then get stuck in a loop. After approximately 10-15 minutes, the task eventually finishes and displays the results.
Please help me resolve this issue.
Status ERROR: org.eclipse.jdt.core code=4 Could not retrieve declared methods org.eclipse.jdt.internal.compiler.problem.AbortCompilation: Pb(324) The type java…
ganncamp
(G Ann Campbell)
November 10, 2023, 7:28pm
3
Hi,
What version of the SonarScanner for Gradle are you using?
And are you having this problem during your compile, or during the compile that the SonarScanner for Gradle triggers?
Version 4.4.1 of the scanner introduces the sonar.gradle.skipCompile
property, although it needs to be set as a system property .
HTH,
Ann
awsmman
(Arman Markosyan)
November 13, 2023, 1:53pm
5
i have added this property in sonarqube task, and change version to 4.4.1 but same error
sonarqube {
androidVariant 'release'
properties {
property "sonar.projectName", "test-Android-Project"
property "sonar.host.url", "*"
property "sonar.projectKey", "*"
property "sonar.login", "*"
property "sonar.sources", "src/main/java"
property "sonar.language", "kotlin,java"
property "sonar.verbose", "true"
property "sonar.qualitygate.wait", "true"
property "sonar.gradle.skipCompile", "true"
}
}
ganncamp
(G Ann Campbell)
November 14, 2023, 1:51pm
6
Hi,
Sorry, for the confusion. I’ve since learned that the problem here isn’t happening during compilation, but during the Analysis.
This happens when we analyze Java files during the Eclipse Compiler frontend invocation. This is a known issue with ECJ (Eclipse compiler), Android, and our analyzer. because ECJ is more strict in following Java language specifications than other compilers and here technically Android violates Java language specifications (JLS).
At the moment the workaround is to set jdkHome
to Java 8 (even if they’re using a different Java version). This works because Java 8 is the last non-modularized Java version.
And we’re working on a better fix.
Thx,
Ann
awsmman
(Arman Markosyan)
November 15, 2023, 7:56am
9
Thank you for your response.
Now, I need to update the sonarqube
task to use Java 8. How can I make this change, or what steps should I take to fix this?
awsmman
(Arman Markosyan)
November 15, 2023, 10:57am
10
I have added the sonar.java.jdkHome
property, set it to the path of JRE 8, and it works for me. Thank you so much!
property "sonar.java.jdkHome", "C:\\Program Files\\Java\\openjdk-jre-8\\bin"
1 Like
system
(system)
Closed
November 22, 2023, 10:58am
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.