Run Code Analysis task failed on azure devops pipeline

Must-share information (formatted with Markdown):
Dear Team,
Please advise if you can assist on this issue.

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Sonarqube version 9.9.1
  • how is SonarQube deployed: zip, Docker, Helm
    Zip
  • what are you trying to achieve
    The run code analysis failed with below errors
  • what have you tried so far to achieve this
    I have search on the web but i have not found a solution yet.
    Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Please refer to attached txt file.
Run Code Analysis task failed .txt (10.3 KB)

Kind Regards,
Kenaz

java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

You need to make sure Java 11 is available on the agent, it looks like it’s only finding Java 8.

Dear Colin,

Thanks.

The issue has been resolved.

Kind Regards,
Kenaz