Skip to content

Martin-Luft/dagger2_issue896

Repository files navigation

Example project for Dagger 2 issue #896

google/dagger#896

Since Dagger 2.12 - Importing this project into Eclipse will result in this error:

The method provider(Provider) in the type DoubleCheck is not applicable for the arguments (Factory)

Using plain Maven produces no error.

I found 2 possibilities to fix this error:

  1. Remove @Singleton from RootView
  2. Replace
@Module
public abstract class MyModule {

  @Binds
  @Singleton
  public abstract RootViewInterface rootView(RootView rootView);
}

with

@Module
public class MyModule {

  @Provides
  @Singleton
  public static RootViewInterface rootView(RootView rootView) {
    return rootView;
  };
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages