gradle version is automatically downloaded to its version 7.6 though i have installed the latest version 8.6 then i tried using tried changing the version through gradle-wrapper.properties but version is udated back to 7.6

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\sonam\MyVueApp\platforms\tempPlugin\core\settings.gradle' (C:\Users\sonam\.gradle\caches\7.6\scripts\37bupetjbxez4p8emeofjjj0z).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65

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

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

BUILD FAILED in 12s
Failed to build plugin @nativescript/core : 
Error: Command gradlew.bat failed with exit code 1
PS C:\Users\sonam\MyVueApp>

You are trying to use Java 21 to run a Gradle 7.6 build.
This cannot work: Compatibility Matrix

What version of Gradle you have installed is absolutely irrelevant in 98.7 % of the cases.
I for example never have any Gradle version installed.
All Gradle builds should have the four wrapper files which define which Gradle version a build is designed for and known working with and take care to use that version to run the build and you should always use the wrapper to execute a build.

If changing in wrapper properties is reverted, you probably run the wrapper task and have the version configured additionally in the build script, or you are maybe running Gradle through some other tool that enforces the Gradle version.

Dear Gradle Master,
Sorry for the late reply, however i would like to thank you for solving the problem,
it very much appreciated, thank you once again, have a good day and till then take care and stay blessed.

1 Like