czyrux / MvpLoaderSample

Sample project to showcase how to use Android Loaders with MVP to preserve Presenter across orientation changes
140 stars 24 forks source link

Attempt to invoke interface method 'PresenterFactory.create()' on a null object reference` #9

Closed alouanemed closed 7 years ago

alouanemed commented 8 years ago

Hey,

I ve implemented your simple in to an app, when launching the app I am getting this error :


Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'presenter.BasePresenter presenter.loader.PresenterFactory.create()' on a null object reference`
at presenter.loader.PresenterLoader.onForceLoad(PresenterLoader.java:39)
at android.support.v4.content.Loader.forceLoad(Loader.java:329)

in this line in particular mPresenter = mPresenterFactory.create();

I am using dagger 2 to inject the presenter factory inside the presenter

czyrux commented 7 years ago

Can you show me more code, what are you injecting in the Fragment, the Presenter or the Factory?

czyrux commented 7 years ago

Closing until I can get further details