Closed sargunv closed 8 years ago
+1
Yup, if we want to provide that functionality properly we should be doing a runtime type check instead of forcing the downcast right away.
If you import the project as a module, you can comment a couple of lines and works perfectly:
RosieActivity.java
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //TODO comentado /if (shouldInitializeActivityScopeGraph()) { injectActivityModules(); }/ int layoutId = getLayoutId(); setContentView(layoutId); ButterKnife.bind(this); onPreparePresenter(); //TODO comentado //presenterLifeCycleLinker.initializeLifeCycle(this, this); }
RosieApplication.java:
@Override public void onCreate() { super.onCreate(); /initGraph(); injectApplication();/ }
@sargunster we have just released a new version with the fix. Thanks!
The documentation states "If you do not want to use Dependency Injection in your project, you do not need to extend from RosieApplication", but I get a ClassCastException when I don't extend RosieApplication: