How do I make Dagger 1 and Dagger 2 coexist together in one Android project?

陌路散爱 提交于 2020-08-09 18:50:30

问题


We have a huge codebase to migrate from dagger 1 to dagger 2 but we would like to do it step by step. For that we were thinking to have both versions as our project dependency and do the migration module by module. But we were unable to make it work. This is the article we referred https://fernandocejas.com/2016/08/03/android-dagger-1-and-2-living-together/ but without any luck or is there any other way? Thanks.


回答1:


There's no other way.

When trying to use both Dagger versions together, you might run into different situations like classpath clashes and conflicts or transitive dependencies issues. So, in order to avoid them, we have to somehow relocate Dagger 2 packages.

As the text said.



来源:https://stackoverflow.com/questions/53292197/how-do-i-make-dagger-1-and-dagger-2-coexist-together-in-one-android-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!