Dagger 2.10 Android subcomponents and builders : <p>Using the new (in 2.10) dagger.android classes, I'm trying to inject things using a Subcomponent that depends on other Modules, and, therefore, has a Builder with setters for those modules. The documentation on <a href="https://google.github.io/dagger/android.html" rel="noreferrer">https://google.github.io/dagger/android.html</a> describes this, but is not clear on how to actually write and/or invoke those setters.</p>

<p>Quoting from the above link:</p>

<blockquote>
  <p>AndroidInjection.inject() gets a DispatchingAndroidInjector from the Application and passes your activity to inject(Activity). The DispatchingAndroidInjector looks up the AndroidInjector.Factory for your activity’s class (which is YourActivitySubcomponent.Builder), creates the AndroidInjector (which is YourActivitySubcomponent), and passes your activity to inject(YourActivity).</p>
</blockquote>

<p>It seems to me that in order to be able to call the setters for the Builder, I need to get in there somewhere and ensure the Builder has all the necessary data? The problem I'm seeing is that at runtime, I get an <code>IllegalStateException: MODULE must be set</code>, when the generated builder for my Subcomponent is invoked by AndroidInjector.</p>

<p>The Subcomponent in question is in fact for a Fragment, not an Activity, but I'm not sure that should matter. Any ideas about how to do this?</p>
