I have a work and library projects. Dagger was used in the work project, and a few days ago I decide to use Dagger in the library project too. I configured Eclipse Java Compiler and Annotation Processing settings for the library project, added required Dagger & JavaWriter JARs, decalred a Module in the library project. Now both project doesn't have any error.
But when I attempting to run application on Android device, it crashes:
java.lang.RuntimeException:
Unable to create application com.iqm.smartapp.AlarmsApplication:
java.lang.IllegalStateException:
Module adapter for class com.iqm.library.IQMLibraryModule could not be loaded.
Please ensure that code generation was run for this module.
I think this caused because in the library project the .apt_generated folder is empty! Dagger isn't generates classes for the library project. Probably there is some IDE/project misconfiguration. But do exactly the came configuration in both work and library project and have no more idea, what can be wrong.
So my question: is it possible to use Dagger in Android library projects? And what should be the right Eclipse configuration to enable requires code generation?
Thanks in advance.
Edit: I made a new clean library project, set it for Dagger and copied all source files from the old one. At this moment all in the new project works as expected. Strange thing!