【问题标题】:Which third-party dependencies are declared in the build.gradle of this Android Studio project?这个 Android Studio 项目的 build.gradle 中声明了哪些第三方依赖?
【发布时间】:2016-11-23 11:43:58
【问题描述】:

我想将this Android Studio project 转换为 Eclipse 项目。

这样做的方法是将所有 src 包和 res 目录中的所有内容从 AS 项目复制到 Eclipse 项目,并通过添加来自 AS 项目的所有附加元素来更改 Eclipse 项目的 Manifest 文件。

问题是我必须为 AS 项目所依赖的所有第三方依赖项(在 build.gradle 中声明)执行此操作,然后将这些库项目添加到这个新创建的 Eclipse 项目中.

通常我会为 AS 项目的 build.gradle 文件的 dependencies 部分中列出的每个库执行此操作。但是对于this library project,我不明白依赖是什么:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
    apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
}

我看不懂第一行和第三行。请告诉我在第一行和第三行声明了哪些库,以便我可以在 Eclipse 中复制这些项目?


编辑:

这是gradlew.bat -q dependencies 命令的输出:


编辑 1:


编辑 2:

【问题讨论】:

    标签: android eclipse android-studio build.gradle support-vector-compat


    【解决方案1】:

    对于每个项目模块,从命令行执行以下操作:

    ./gradlew -q dependencies
    

    这将打印出模块所有依赖关系的图表。

    【讨论】:

    • from the command line: - 普通的 windows cmd 程序?我从未从命令行运行 Java 程序
    • 是的。在 Windows 上,您可以调用 gradlew.bat 而不是 ./gradlew,因为您使用的是 Gradle 包装器。
    • 我输入D:\Delight\Workspaces\Workspace of Libraries\vector-compat-master\library>gradlew.bat -q dependencies,得到'gradlew.bat' is not recognized as an internal or external command, operable program or batch file.
    • 一般gradlew.bat位于项目目录,比modules目录高一层,所以你要指向它。我不确定它是如何在 Windows 上完成的,在 Mac 上它将是 ../gradlew 而不是 ./gradlew。
    • 看起来您正在根项目上运行任务,而您应该在模块上运行它。您可以改用以下内容:gradlew.bat -q ::dependencies,用模块的真实名称替换
    猜你喜欢
    • 2015-12-31
    • 2015-01-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多