Error compiling Dagger 2 in Eclipse

0

I'm studying the Dagger official website design example, which can be accessed at this link: link . I am using the eclipse IDE. When I run the project it gives error in the line where reference is made to the generated Dagger_Coffee class. Eclipse is simply not generating this file automatically, as the tutorials claim. I stress that I will not use Dagger in a mobile project, but rather with Java EE. I know CDI is the most appropriate, but this is a requirement of my boss. What must be wrong? Here is the code:

package coffee;

import dagger.Component;
import javax.inject.Singleton;

public class CoffeeApp {
@Singleton
@Component(modules = { DripCoffeeModule.class })
    public interface Coffee {
        CoffeeMaker maker();
  }

  public static void main(String[] args) {
      Coffee coffee = Dagger_Coffee.builder().build();
      coffee.maker().brew();
  }
}
    
asked by anonymous 14.05.2015 / 16:50

1 answer

0

Dagger does not generate more classes with "_", so replace Dagger_Coffee with DaggerCoffee and then give Rebuild in the project.

    
16.11.2015 / 14:37