Thursday, November 27, 2014

STACK: Dagger example built through eclipse fails with 'Please ensure that code generation was run for this module.'

За dagger ашиглаж байхад 1 асуудал нэлээд цагийг минь үрлээ, энэ асуудлыг шийдсэн зааврыг орууллаа.

-----------------------------------------------------------------------------------
The problem is I am missing the javawriter library. Also, you MUST use version 2.2.1 of javawriter and NOT the latest which is 2.3.0 (this will probably change, but remains true at the time of writing this on 11/27/2013). The link provided should take you to the correct place. Please double triple check this, for a total of six times. I'll also include a list of other reasons why you might see this message.
First, please ensure that all these checkboxes are checked.
Project -> Properties ->Java Compiler -> Enable Project Specific Settings
Project -> Properties ->Java Compiler -> Annotation Processing -> Enable Project Specific Settings
Project -> Properties ->Java Compiler -> Annotation Processing -> Factory path -> Enable Project Specific Settings. 
Then on the same screen, click "Add jars" and add: javawriter-2.2.1.jar, dagger-1.1.0.jar, dagger-compiler-1.1.0.jar and javax.inject.jar in this list as well for a total of four jars.
Those four jars should be in a folder called 'libs' on your project's main path.
If you are using libraries and want to use Dagger for DI in those libraries, you will have to do the steps above on those projects as well.
-----------------------------------------------------------------------------------
Source: http://stackoverflow.com/questions/19555023/dagger-example-built-through-eclipse-fails-with-please-ensure-that-code-generat