我有项目 A,它曾经有模块 A1,使用 dagger v. 1.2.2。
现在我想添加到项目 A,模块 A2,它依赖于 dagger v. 2.0。
但我不能,因为这两个匕首库是冲突的。我可以在不同的 android 模块中以某种方式处理多个版本的库吗?
你不能两者兼得。
您需要从依赖项中排除冲突的库:
configurations {
all*.exclude group: 'com.google.android', module: 'support-v4'
}
dependencies {
compile 'com.android.support:support-v4:13.0.0'
}
From: https://github.com/stephanenicolas/robospice/issues/161 https://github.com/stephanenicolas/robospice/issues/161
OR
dependencies {
compile("org.gradle.test.excludes:api:1.0") {
exclude module: 'shared'
}
}
From: https://docs.gradle.org/current/userguide/dependency_management.html https://docs.gradle.org/current/userguide/dependency_management.html #52.4.7
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)