Cordova – Android – Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0

Issue

Making an android project with cordova, when I try to making a build, it failed with this issue:

execution failed for task ':app:compileDebugJavaWithJavac'

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0

These are my versions:

Cordova: 10.0.0
Android Platform: 10.1.2 
Gradle: 7.1.1

I am absolutely sure that Gradle is installed when I install the Android platform (and it is out of my control) and that everything was working fine until 1 month ago … and I have not changed anything

How I can fix this issue???
Have I to update Gradle? How?
Have I to update the project? How?

it’s very strange … and frustrating

Solution

Updating gradle solves the problem.

There are different ways to update the gradle, as explained in their official website: https://gradle.org/install/

Assuming that you are a windows user:

Downloading binary files of gradle and extracting the folder to the directory "c:/gradle" is enough.

Answered By – Asqan

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published