CRamsan / CoreProject

This is a project that aims to provide a scalable architecture for mobile development.
https://cramsan.com/
1 stars 0 forks source link

Fix kotlin.UninitializedPropertyAccessException: lateinit property modelProvider has not been initialized in androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create (ViewModelProvider.java:267) #89

Closed CRamsan closed 4 years ago

CRamsan commented 4 years ago

Version 0.12-debug(1)

Stacktrace

androidx.lifecycle.ViewModelProvider$AndroidViewModelFactory.create (ViewModelProvider.java:267);

androidx.lifecycle.SavedStateViewModelFactory.create (SavedStateViewModelFactory.java:106);

androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.java:185);

androidx.lifecycle.ViewModelProvider.get (ViewModelProvider.java:150);

androidx.fragment.app.Fragment.performActivityCreated (Fragment.java:2718);

androidx.fragment.app.FragmentStateManager.activityCreated (FragmentStateManager.java:346);

androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1200);

androidx.fragment.app.FragmentManager.addAddedFragments (FragmentManager.java:2236);

androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:2009);

androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:1965);

androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:1861);

androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2641);

androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2589);

androidx.fragment.app.Fragment.performActivityCreated (Fragment.java:2723);

androidx.fragment.app.FragmentStateManager.activityCreated (FragmentStateManager.java:346);

androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1200);

androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1368);

androidx.fragment.app.FragmentManager.moveFragmentToExpectedState (FragmentManager.java:1446);

androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1509);

androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2637);

androidx.fragment.app.FragmentManager.dispatchActivityCreated (FragmentManager.java:2589);

androidx.fragment.app.FragmentController.dispatchActivityCreated (FragmentController.java:247);

androidx.fragment.app.FragmentActivity.onStart (FragmentActivity.java:541);

androidx.appcompat.app.AppCompatActivity.onStart (AppCompatActivity.java:210);

Reason

kotlin.UninitializedPropertyAccessException: lateinit property modelProvider has not been initialized

Link to App Center