Last active
April 25, 2018 17:56
-
-
Save freaksgit/713c13fb31f3df2d41c1c32aab726dcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App extends DaggerApplication { | |
@Inject | |
OnFirstRunUseCase onFirstRunUseCase; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
((AppComponent) applicationInjector()).inject(app); //solving | |
onFirstRunUseCase.execute(() -> {}, throwable -> {}); | |
} | |
@Override | |
protected AndroidInjector<? extends DaggerApplication> applicationInjector() { | |
return DaggerAppComponent | |
.builder() | |
.application(this) | |
.build(); | |
} | |
} | |
//----Logcat Output----// | |
java.lang.RuntimeException: Unable to create application xx.xx.xxx.App: | |
java.lang.NullPointerException: Attempt to invoke virtual method | |
'void OnFirstRunUseCase.execute(io.reactivex.functions.Action, | |
io.reactivex.functions.Consumer)' on a null object reference |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment