无法看到的依赖关系树与gradlew或摇篮 [英] Unable to see dependency tree with gradlew OR gradle
问题描述
我正在摇篮(1.12)的最新版本。在项目的根目录下,我运行下面的命令,这在此答案由@CommonsWare 的应该给依赖关系树
I'm running the latest release of gradle (1.12). In the project's root directory, I run the following command, which as described in this answer by @CommonsWare should give the dependency tree:
当我运行它,出现这种情况:
When I run it, this happens:
$摇篮-q依赖
------------------------------------------------------------
Root project
------------------------------------------------------------
No configurations
在考虑中的项目是使用内置了Android Studio中的新项目向导从头开始创建一个Android摇篮工程。我的顶级build.gradle文件是这样的:
The project in question is an Android gradle project created from scratch using the new project wizard built in with Android Studio. My top-level build.gradle file looks like this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.10.+'
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
}
subprojects {
repositories {
flatDir {
dirs "$rootDir/libs"
}
}
}
和我settings.gradle文件看起来是这样的:
And my settings.gradle file looks like this:
include ':app', ':facebook', 'pullToRefresh'
据我了解,这是一个非常基本的摇篮配置。有没有人有一个想法,为什么依赖关系树函数返回什么?让我知道如果我需要提供更多的信息。
From what I understand this is a very basic gradle configuration. Does anyone have an idea why the dependency tree function is returning nothing? Let me know if I need to provide more information.
推荐答案
您顶级build.gradle没有任何依赖关系本身。你必须运行(从项目根目录):
Your top level build.gradle doesn't have any dependencies itself. You'll have to run (from the project root dir):
./gradlew app:dependencies
这篇关于无法看到的依赖关系树与gradlew或摇篮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!