Gradle: Print dependency graph on Terminal for your Android App

While using gradle build in Android Studio or IntelliJ if you are facing issues with your dependencies, try to print the dependency tree of your project and take a look at what dependencies each library has and exclude them.

To print the dependency graph for all dependencies of the app module.

Go to terminal and type in the root folder.

gradle :app:dependencies

or

gradle app:dependencies