質問

I am currently using the latest version of Android Studio and I have a (Gradle) project. I am struggling to find a way to view some kind of list of all the dependecies for such project in Android Studio.

I am looking for a feature, if available, similar to the "Maven dependencies" view in a Maven project in Eclipse, that lists all the jars that are loaded as maven dependencies for any given maven project.

Thanks.

役に立ちましたか?

解決

There's the androidDependencies task in the Gradle build files, but I mention it mostly to dismiss it -- it's all but obsolete at this point (see https://groups.google.com/forum/#!searchin/adt-dev/androiddep%7Csort:relevance%7Cspell:false/adt-dev/iius619cxmU/ls0oCQiT03QJ). Under the Analyze menu there's the Analyze Module Dependencies command, which launches a really powerful dependency viewer that's built into IntelliJ. One disadvantage is that it's not yet smart about Gradle and the Android world, so it will for example show you jar files instead of the Maven-based dependencies that spawn them, and if you have AAR dependencies, it will show you jar files inside the exploded-bundles directories in the build directory, which is somewhat misleading. Having said all that, there's a ton of information in there and you can likely get whatever you want as long as you have a good understanding of how it sees the world.

他のヒント

You can find this information in a couple of places. With Android Studio 0.4.2 or newer, you can go to your module properties then go to the Dependencies tab. Any Maven based dependencies will be listed here. The same information is also available in the build.gradle file located under the 'app' directory of your module.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top