gpt4 book ai didi

android - 在gradle中访问依赖模块的依赖模块的类

转载 作者:行者123 更新时间:2023-11-29 23:36:18 25 4
gpt4 key购买 nike

我在一个使用 gradle 的 android 应用程序中有一个结构,

module A:
dependencies{
module B
}
module B:{
dependencies{
module C
}
module C:{
dependencies{
module D
}

这些依赖关系是可传递的吗?如何直接访问模块A中模块D的类?

最佳答案

编辑:与 D 相同

CA

的传递依赖

您的 ide 应该允许您直接在 A 中使用 C 的类,但这是一种不好的做法。如果A确实需要C,就应该声明为直接依赖

module A:
dependencies {
module B
module C
module D
}

关于android - 在gradle中访问依赖模块的依赖模块的类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52201735/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com