I am new to the MVVM and Dagger and I am trying ot implement MVVM with Dagger 2 and Butterknife in my app. unfortunatelly I get the following error:
error: @Modules cannot be scoped. Did you mean to scope a method instead?
I get this error when I try to make my 'ViewModelModule' singleton. Here is my class:
@Singleton
@Module
public abstract class ViewModelModule { ... }
I am refering 'ViewModelModule' in my ' ApplicationModule ' which looks like so:
@Singleton
@Module(includes = ViewModelModule.class)
public class ApplicationModule { ... }
If I remove the 'Singleton' annotation everithing works fine. But what am I missing? What am I doing wrong?