Could not determine java version from '21.0.1'

* What went wrong:
Could not determine java version from '21.0.1'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Why I got this error?

Maybe because of Compatibility Matrix?

but i have gradle 8.5

C:\Users\sebas>gradle -v

Gradle 8.5

Build time: 2023-11-29 14:08:57 UTC
Revision: 28aca86a7180baa17117e0e5ba01d8ea9feca598

Kotlin: 1.9.20
Groovy: 3.0.17
Ant: Apache Ant™ version 1.10.13 compiled on January 4 2023
JVM: 21.0.1 (Oracle Corporation 21.0.1+12-LTS-29)
OS: Windows 10 10.0 amd64

Well, it was just a wild guess as you did not provide any information at all.

Are you sure that is the Gradle version you are using?

It is the Gradle version you have installed - which is irrelevant 99% of the time.

To run a build you should always use its Gradle wrapper and that defines which Gradle version is used.

You do not even need to ever have any Gradle version installed.

Can you share a build --scan or at least the --stacktrace output as advised by the error message you posted?

ok, i think i find an error. Nevermind, and thanks for help.

1 Like