My Android App se bloque dans l'environnement de production, notre outil de reporting crash est XamarinInsights, il retourne la pile suivanten'a pas réussi à résoudre paramètre pour répartiteur de paramètre de type IMvxMainThreadDispatcher lors de la création
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.GetIoCParameterValues (System.Type type, System.Reflection.ConstructorInfo firstConstructor) [0x00066] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.IoCConstruct (System.Type type) [0x0002a] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.Mvx.IocConstruct[T]() [0x00005] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.Mvx+<>c__13`2[TInterface,TType].<LazyConstructAndRegisterSingleton>b__13_0() [0x00000] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer+<>c__DisplayClass33_0`1[TInterface].<RegisterSingleton>b__0() [0x00000] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer+ConstructingSingletonResolver.Resolve() [0x00028] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.InternalTryResolve (System.Type type, MvvmCross.Platform.IoC.MvxSimpleIoCContainer+IResolver resolver, System.Object& resolved) [0x00041] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.InternalTryResolve (System.Type type, System.Nullable`1[T] requiredResolverType, System.Object& resolved) [0x0002e] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.InternalTryResolve (System.Type type, System.Object& resolved) [0x00000] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.Resolve (System.Type t) [0x00011] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.Resolve[T]() [0x00000] in <4ddde23419c5494288c799fcdbb0f189>:0
at MvvmCross.Platform.Mvx.Resolve[TService]() [0x00005] in <4ddde23419c5494288c799fcdbb0f189>:0
at MyNamespace.Android.PushNotificationListener.SendNotification (System.String message, MyNamespace.Core.NotificationPayload payload) [0x00137] in <03e2d64cacc54ebebbfb6133dd9c33ae>:0
Je pense exception a été levée lorsque J'essaie de résoudre et de construire MainThreadDispatcher. Mais je ne peux pas comprendre pourquoi.
private IMvxMainThreadDispatcher _dispatcher = Mvx.Resolve<IMvxMainThreadDispatcher>();
private void ShowToastMessage(string message, double duration)
{
_dispatcher.RequestMainThreadAction(() =>
{
...
});
}