aipok
10/29/2020, 2:07 PMScopeActivity
and has field defined like this
private val splashVM by scope.viewModel<SplashViewModel>()
it failed with Caused by: java.lang.IllegalStateException: Your activity is not yet attached to the Application instance. You can't request ViewModel before onCreate call.
Am I understand incorrectly that by scope.viewModel
should be called only while I’m calling splashVM
somewhere later in my code? And I only calling splashVM
inside onCreate
but for some reason it still failed and seems to call scope right away on activity init method call.
@arnaud.giuliani should I use it somehow differently now?arnaud.giuliani
10/29/2020, 2:20 PMarnaud.giuliani
10/29/2020, 2:20 PMarnaud.giuliani
10/29/2020, 2:21 PMscope.get
or other injection, as we are doing it or youaipok
10/29/2020, 2:21 PMscope
.aipok
10/29/2020, 2:27 PMviewModel
and getViewModel
extensions. At least the canary 15.arnaud.giuliani
10/29/2020, 3:24 PM