4

I've read here that Android Annotations has been updated to work with Dagger (1), but I am not sure if it automatically applies to Dagger 2 as well.

Does anybody use AA and Dagger 2 together?

Thanks.

4

1 回答 1

4

我一起使用 dagger2、AndroidAnnotations 和 ButterKnife(用于适配器),它们工作正常。与 dagger1 的一个区别是您必须注入声明@Inject 字段的每个特定类(不仅仅是父活动)。但是您不必注入由 AndroidAnnotations 生成的类,因为注入的字段未在生成的类中声明。

于 2015-05-19T10:39:59.350 回答