问题
The error:
MvvmCross.Exceptions.MvxIoCResolveException
: Failed to resolve typeMvvmCross.ViewModels.IMvxAppStart
occurred
when tried to override Application.OnCreate
[Application]
public class RemoteApplication : MvxAndroidApplication<Setup, Core.App>
{
public RemoteApplication(IntPtr reference, JniHandleOwnership transfer) :
base(reference, transfer) { }
public override void OnCreate()
{
base.OnCreate();
}
}
回答1:
It was fixed by @Martijn00 advice from Similar Question
public override void OnCreate()
{
MvxAndroidSetupSingleton
.EnsureSingletonAvailable(ApplicationContext)
.EnsureInitialized();
base.OnCreate();
}
6.2.3MvvmCross
update from 6.2.2
to 6.2.3
fixed the crash, but the app stuck on Splash Screen
then. So only EnsureInitialized()
fixed it entirely.
来源:https://stackoverflow.com/questions/54690561/imvxappstart-related-crash-with-application-oncreate-overridden