Reputation: 2013
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?
Upvotes: 92
Views: 89321
Reputation: 15963
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)
Upvotes: 89
Reputation: 4641
In Gradle 7.3.3. , You can just write in the Terminal
.\gradlew --warning-mode all
or
.\gradlew --stacktrace
Upvotes: 2
Reputation: 186
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"
Upvotes: 2
Reputation: 2589
Add this
org.gradle.warning.mode=all
in Gradle Scripts -> gradle.properties(Project Properties)
Upvotes: 29
Reputation: 12695
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:
Upvotes: 53