Deprecated Gradle Features Were Used in This Build, Making It Incompatible with Gradle 5.0

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

Run the Gradle build with a command line argument --warning-mode=all to see what exactly the deprecated features are.

It will give you a detailed description of found issues with links to the Gradle docs for instructions how to fix your build.

Adding --stacktrace to that, you will also be able to pinpoint where the warning comes from, if it's triggered by outdated code in one of the plugins and not your build script.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. while using FileWriter Class to output the file in Java

Try gradle --version and compare it with ./gradlew wrapper --version; maybe what you need to downgrade is gradle-wrapper rather than gradle itself.


However, that's simply a warning that your code or some dependency is using some Gradle feature that was deprecated.

This is not an error per-se.

A deprecation is just a warning, about the need to update the currently running code in order to be able to upgrade when the Gradle 8.0 API will be released.

Only at that point you'll be forced to fix the problem.

You can ignore it, for now. But don't forget it.

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

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.

  • Download binary files of gradle for the next version

  • Update path of gradle in PATH variable in your computer
    Sample Image

  • You should define another variable as follows:
    Sample Image

  • Variable name should be the same and its value should be the same with the one you use. While creating your cordova environment, this url is being used.

  • Save and restart your IDE's or CLI windows

  • test it out like ´gradle -v´ and you should see the active version of gradle in your system.

  • Be prepared to the new problems in your cordova environment because you have a upgraded gradle now

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. -REACT-NATIVE

I have fixed the above issue by adding this line in android/app/build.gradle

android {
...
defaultConfig {
...
missingDimensionStrategy 'react-native-camera', 'general' <-- insert this line
}
}


Related Topics



Leave a reply



Submit