If you're building the current stable (e.g. v12)...

Gradle 8 isn't supported by cordova-android and is known
to have issues. Normally the system gradle version doesn't matter since it's only
used to install the gradle wrapper at the correct version, however Gradle 8
doesn't seem to like installing a Gradle 7 wrapper so I'd advise installing the
latest version of 7.x as your system gradle.

There's a API 34 Support PR[1] that makes the changes to support API 34,
and by extension, Gradle 8.

[1] https://github.com/apache/cordova-android/pull/1678

On 2024-01-24 08:31, Riza Dindir wrote:
Hello,

A couple of days ago I was able to build cordova applications. Today I can
not build a cordova application. Did something change?

I am using gradle 8.5 on kernel 5.15.145. The "cordova requirements"
command result is

Requirements check results for android:
Java JDK: installed 17.0.6
Android SDK: installed true
Android target: installed android-33,android-32,android-31
Gradle: installed /usr/share/gradle/bin/gradle

Requirements check results for browser:

And the result for the build command "cordova build android" is

Checking Java JDK and Android SDK versions
ANDROID_HOME=/opt/android-sdk (recommended setting)
ANDROID_SDK_ROOT=/opt/android-sdk (DEPRECATED)
Using Android SDK: /opt/android-sdk

FAILURE: Build failed with an exception.

* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

* 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 1s
Command failed with exit code 1: /usr/share/gradle/bin/gradle -p
/home/rdindir/Documents/workspaces/cdv-gas-milage/platforms/android wrapper
-b
/home/rdindir/Documents/workspaces/cdv-gas-milage/platforms/android/wrapper.gradle

Regards


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to