Dagger 2 crash: "Cannot return null from a non-@Nullable @Provides method"
<p>I haven't been able to recreate it myself. This is a crash that has shown up in Crashlytics by Fabric.</p>

<p>The line number points to this:
<code>App.getApp().getApplicationComponent().inject(this);</code></p>

<p>I can't see where I'm going wrong.</p>

<p>'App' is an extension of the Application class that's in the manifest and working fine on the devices I test on. It is like this:</p>

<pre><code>applicationComponent = DaggerApplicationComponent.builder()
            .appModule(new AppModule(this))
...
...
            .netModule(new NetModule())
            .build();
</code></pre>

<p>The crashing fragment in question has the dependency marked with the @Inject annotation.</p>

<p>Here is a full stack trace:</p>

<pre><code>Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com....../com.....activities.MainActivity}: java.lang.NullPointerException: Cannot return null from a non-@Nullable @Provides method
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3254)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350)
   at android.app.ActivityThread.access$1100(ActivityThread.java:222)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:158)
   at android.app.ActivityThread.main(ActivityThread.java:7229)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by java.lang.NullPointerException: Cannot return null from a non-@Nullable @Provides method
   at dagger.internal.Preconditions.checkNotNull(Preconditions.java:48)
   at com.....di.modules....Module_Provides...Factory.get(...Module_Provides...Factory.java:30)
   at com......di.modules....Module_Provides...Factory.get(...Module_Provides...Factory.java:10)
   at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
   at com.....fragments.HomeFragment_MembersInjector.injectMembers(HomeFragment_MembersInjector.java:39)
   at com.....fragments.HomeFragment_MembersInjector.injectMembers(HomeFragment_MembersInjector.java:9)
   at com.....di.DaggerApplicationComponent.inject(DaggerApplicationComponent.java:217)
   at com.....fragments.HomeFragment.onCreate(HomeFragment.java:87)
   at android.support.v4.app.Fragment.performCreate(Fragment.java:2068)
   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1055)
   at android.support.v4.app.BackStackRecord.setLastIn(BackStackRecord.java:838)
   at android.support.v4.app.BackStackRecord.calculateFragments(BackStackRecord.java:878)
   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:719)
   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1677)
   at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:388)
   at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:604)
   at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
   at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1265)
   at android.app.Activity.performStart(Activity.java:6915)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3217)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3350)
   at android.app.ActivityThread.access$1100(ActivityThread.java:222)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)
   at android.os.Handler.dispatchMessage(Handler.java:102)
   at android.os.Looper.loop(Looper.java:158)
   at android.app.ActivityThread.main(ActivityThread.java:7229)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
</code></pre>