Add '--warning-mode all' command line argument in Android Studio
Android StudioGradleAndroid Studio Problem Overview
I am getting the following message when I compile an Android Studio project:
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
How do I add the '--warning-mode all' command line setting to my Android Studio project so I can find the deprecated feature?
Android Studio Solutions
Solution 1 - Android Studio
Just create a file called gradle.properties in your root project:
root
|--gradle.properties
|--build.gradle
|--app
|----build.gradle
Then add inside that file:
> org.gradle.warning.mode=(all,none,summary)
Solution 2 - Android Studio
Please have a look at this older SO question, in particular this answer.
Just pasting the same picture here, but credits should go to original answer author:
Solution 3 - Android Studio
Solution 4 - Android Studio
This error is currently being caused by the shutdown of jcenter.
"The RepositoryHandler.jcenter() method has been deprecated. This is scheduled to be removed in Gradle 8.0. JFrog announced JCenter's shutdown in February 2021. Use mavenCentral() instead. Consult the upgrading guide for further information: https://docs.gradle.org/7.0.2/userguide/upgrading_version_6.html#jcenter_deprecation"