android - Dagger injects {} method issue -


i know

why need add

injects = {              firstfragment.class,              downloadmanager.class,             bookrefreshtask.class          }  

in application class or module class.

as injecting fragment , activity using graph.inject(this) method

as undestand this.

dagger consists of 2 modules:

  • runtime module (which uses @inject annotations satisfy dependencies @ runtime)
  • compile time module (which uses "injects = {a1.class, a2.class}" check code unsatisfied dependencies).

so price need pay compile time errors handling.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -