Hi all, I know this has been asked before, but I am not able to solve it.
cordova build gives me:
Checking Java JDK and Android SDK versions
ANDROID_HOME=/Users/domenicogagliano/Library/Android/sdk (recommended setting)
ANDROID_SDK_ROOT=undefined (DEPRECATED)
Using Android SDK: /Users/domenicogagliano/Library/Android/sdk
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '/Users/domenicogagliano/cordova_test/hello/platforms/android/settings.gradle' (/Users/domenicogagliano/.gradle/caches/7.6/scripts/dqjrgsw17c62wbpoagod92e1e).
> 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**
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings
**BUILD FAILED** in 501ms
Command failed with exit code 1: /Users/domenicogagliano/cordova_test/hello/platforms/android/gradlew -b /Users/domenicogagliano/cordova_test/hello/platforms/android/build.gradle cdvBuildDebug
Initially I had Java 22 and I dowgraded to Java 21 but the proble still persist. I am using Gradle 8.7 and I am using Mac Terminal
Which Gradle version you have installed is irrelevant.
Usually, you do not even have any version of Gradle installed.
Any sane Gradle project includes the 4 Gradle wrapper files that control and manage the Gradle version that is used to execute the build if the wrapper is used and you should always use the wrapper.