1

I'm trying to set up a new App with Mortar. For this I am trying to build the mortar HelloWorld projects. I have to use Eclipse because Android Studio does not support native debugging (I prefer Android Studio and Gradle much more).

  • The mortar-helloworld example with Dagger1 works in Eclipse (Ant) when I set up Dagger1 like described here
  • The mortar-hellodagger2 example works when I build it with Maven
  • However when I try to build the mortar-hellodagger2 example with Eclipse (Ant) I get a ClassNotFoundException: com.example.mortar.Dagger_Main_Component.

I did set up Dagger2 like Dagger1 and put the libs in the folders like this:

libs: dagger-2.0, javax.inject-1
compile-libs: dagger-compiler-with-dependencies-2.0.jar

Has anyone successfully set up Eclipse with Dagger2?

1 Answer 1

1

You have to enable annotation processing in Eclipse. Right click on the project > Properties > Java Compiler > Annotation Processing > Enable ...

1
  • It is enabled... I said Dagger1 works which it only does when Annotation Processing is enabled. Dagger2 doesn't work even with Annotation Processing.
    – Saenic
    Apr 7, 2015 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.