Reputation: 43
I am new to Dagger-2. Previously I have successfully tried Dagger-2 demo program. Now I want to try the same in Android. For that I have done the following:
I have used Eclipse Neon for Android. In it I have installed "Android for Maven Eclipse" and m2e-apt. Then created an Android project and converted it to maven. Set java version to 1.7 for the project. Added Dagger 2.5 and Dagger-compiler 2.5 to the pom. Added the working demo code into the Android project. Unchecked the "Java Build Path -> Source -> Allow output folders for source folders". All dependencies are resolved (Eclipse doesn't report any error/warning). Dagger generates its classes. Now when I run the project, I get "NoClassDefFoundError", specifically missing Class1Module_ProvideClass1Factory. I used "apktool" to look inside the dex file. It is there. Also, prior to loading that class, some other Dagger generated classes are loaded successfully but fails only for this class. Where am I missing?
Upvotes: 0
Views: 228