*public abstract class *AppModule {

*//    @ContributesAndroidInjector(modules = SharedPreferencesModule.class)//   
 abstract SecondActivity secondActivity();   *@Binds
    *abstract *Context getContext(Application application);
    *abstract *SharedPreferences sharedPreferences(Context context);

@Component(modules = AppModule.*class*)
*public interface *AppComponent {
    *void *inject(Activity mainActivity);
    Context getContext();
    SharedPreferences getSharedPreferences();

    *interface *Builder{
        AppComponent build();
        @BindsInstance Builder application(Application application);

Error:(24, 32) error: @Binds <http://twitter.com/Binds> methods must have only 
one parameter whose type is assignable to the return type
What does this error mean? I dont understand a thing . Where is the 
implementation of the getContext() abstract method to be provided?
According to studio,that method is unused.
Please help,this is getting extremely complicated and confusing.
This is this medium article:

You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to