Search code examples
androidandroid-studiogradledependenciesandroidx

How can I find used lib version in Android Studio project?


For an example, I want to find out, if at all androidx libraries were used, and if yes, what version?

  • androidx.activity
  • androidx.fragment
  • androidx.lifecycle:lifecycle-extensions

I know how to look up in the build.gradle files. But I also want to know, if these libraries, are imported indirectly by another library, without being listed in my gradle files?


Solution

  • If you are using gradle you can see the complete dependency list of your project by running the following command in the project root directory :

    ./gradlew app:androidDependencies
    

    or this if you want to see them as a tree

    ./gradlew app:dependencies
    

    You can also see the list in Android Studio, as described in the View module dependency docs, by selecting View -> Tool Windows -> Gradle