I have project A, which used to have module A1, that used dagger v. 1.2.2. Now I'd like to add to project A, module A2, that has dependency on dagger v. 2.0. But I can't because these two dagger libs are in conflict. Can I approach somehow multiple versions of library in different android modules?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
You can't have both.
You need to exclude the conflicting libraries from dependencies:
From: https://github.com/stephanenicolas/robospice/issues/161
OR
From: https://docs.gradle.org/current/userguide/dependency_management.html #52.4.7
Why do you wan to t keep both of them? I don't think if it is possible, you should go for one library only. And here you should use the latest one, as I think if the latest one is added the older one doesn't matter. Check out these links if they help you with dagger...
Dagger dependencies when overriding graph with mock module causes NoClassDefFoundError
How to use dagger in a android library project
Dagger dependencies when overriding graph with mock module causes NoClassDefFoundError
You need to exclude the dagger v. 1.2.2 library and let the dagger v. 2.0. The latter normally will be back compatible. Look at the gradle doc about how to exclude specific dependency. https://docs.gradle.org/current/userguide/dependency_management.html