There are many libs in my android project External Libararies and I want to know where they come from.
I used the command line: gradlew :app:dependencyInsight --configuration compile --dependency mentioned in this answer
Try to find the recyclerview lib as you can see in the picture above
gradlew :app:dependencyInsight --configuration compile --dependency recyclerview
But find nothing:
Task :app:dependencyInsight
No dependencies matching given input were found in configuration ':app:compile'
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
witch reminded me that there is no app:compile configuration in my build.gradle file. After gradle 3.0 compile has been replaced by implementation and api. So I changed the command line as below:
gradlew :app:dependencyInsight --configuration implementation --dependency recyclerview
but went wrong:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:dependencyInsight'.
Resolving configuration 'implementation' directly is not allowed
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
1 actionable task: 1 executed
I googled a lot about this bug but cannot find a answer. Later I replaced all the 'implementation' with 'compile' in build.gradle file, and used the first compile-configuration command line, and it worked.
E:\AndroidApps\SqliteLearn>gradlew :app:dependencyInsight --configuration compile --dependency recyclerview
Configure project :app
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
... ...
Task :app:dependencyInsight
com.android.support:recyclerview-v7:26.1.0
\--- com.android.support:design:26.1.0
\--- compile
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
It appears that the command line above only works with compile configuration. Is there a command line that can do the same job and works with implementation configuration?