与IMvxAppStart相关的崩溃与Application.OnCreate被覆盖

时间:2019-02-14 12:36:18

标签: xamarin.android mvvmcross oncreate

错误:

  

MvvmCross.Exceptions.MvxIoCResolveException:发生无法解析类型MvvmCross.ViewModels.IMvxAppStart的事件

当尝试覆盖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 个答案:

答案 0 :(得分:0)

它是根据Similar Question

@ Martijn00 建议修复的
public override void OnCreate()
{
    MvxAndroidSetupSingleton
        .EnsureSingletonAvailable(ApplicationContext)
        .EnsureInitialized();

    base.OnCreate();
}

6.2.3
MvvmCross6.2.2的{​​{1}}更新修复了当机问题,但随后该应用卡在了6.2.3上。因此,只有Splash Screen完全将其修复。