When upgrading an Android project to a newer Android version, Google may deprecate some of the previously used Android classes and methods. By default, the gradle compilation process will only print out a summary message "Some input files use or override a deprecated API", as shown in the Android Studio screenshot below:
To enable the compilation process to print out a verbose message of the deprecated API, one or more of the build.gradle file may need to be edited to add in the -Xlint:deprecation option. In the example, the top most or project level build.gradle file was edited.
- In Android Studio, open up the project build.gradle file. Scroll to the allprojects section.
- Add in the gradle.projectsEvaluated sub section with the -Xlint:deprecation option as shown below.
- Save. Now when building the Android project, the deprecated API will be printed in the console.