Could not determine java version from error persists after gradle upgrade

I was trying to build a project with the Ubuntu-packaged gradle v4.4.1-10, then after the following error popped up.

FAILURE: Build failed with an exception.

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

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

* Get more help at https://help.gradle.org

Thereafter, when when gradle to v7.4.2, the problem still persisted, but after deleting & re-recloning the same repository, it worked.
I’ve thought it was kind of cache problem, but no ./gradle/cache directories within the project’s directory.
I was curious to understand the root cause behind this! Is there some kind of metadata that gets saved somewhere at some file at the first invocation of gradle within the project’s directory?
Thanks!

not sure of the cause but issue with the cache that in the home directory

home directory are

  1. in linux `/home/userName/.gradle/’
  2. not sure about windows but it will be under the username folder

check this one
https://docs.gradle.org/current/userguide/directory_layout.html#dir:gradle_user_home

hope that help and have a nice day :slight_smile:

Thanks for mentioning this fact. Now i can get this out of the equation when debugging in the future!

@polendina you welcome :slight_smile: