levavare
levavare

Reputation: 494

Do Dagger 2 and Android Annotations work together?

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.

Upvotes: 4

Views: 566

Answers (1)

Chris.Zou
Chris.Zou

Reputation: 4596

I'm using dagger2, AndroidAnnotations and ButterKnife(for adapters) all together and they work fine. One difference to note from dagger1 is that you have to inject every specific class(not just the parent activity) that declares @Inject fields though. But you don't have to inject classes generated by AndroidAnnotations, since the injected fields are not declared in generated classes.

Upvotes: 4

Related Questions