2.Dagger2模块化引入
2017-07-13 本文已影响0人
wingoo
1.Module中includes引入
@Module(includes = {importModule.class})
public class MyModule{
}
2.Component中引入
@Component(modules = {Module1.class,importModule.class})
public interface MyComponent {
}
3.dependence中引入
@Component(modules = {Module1.class},dependencies = ImportComponent .class)
public interface MyComponent {
}
@Component(modules = {importModule.class})
public interface ImportComponent {
}