Erro: Failed to find constructor for type MvvmCross

In my xamarin project I'm using the mvvmcross framework, but my ios project does not start it crash soon after the launcher, in my android version it works.

my line that triggers the error:

public sealed class App : MvxApplication
{
public override void Initialize()
{
CreatableTypes()
.EndingWith("Service")
.AsInterfaces()
.RegisterAsLazySingleton();

        RegisterNavigationServiceAppStart<AcessoViewModel>();
    }
[...]

}

Unhandled Exception:

MvvmCross.Platform.Exceptions.MvxIoCResolveException: Failed to find constructor for type MvvmCross.Core.ViewModels.MvxNavigationServiceAppStart`1[[AppConsumidor.Foundation.ViewModels.AcessoViewModel, AppConsumidor.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]

2018-05-22 18:20:12.905 AppConsumidor.iOS[24622:318652]
Unhandled Exception:
MvvmCross.Platform.Exceptions.MvxIoCResolveException: Failed to find constructor for type MvvmCross.Core.ViewModels.MvxNavigationServiceAppStart1[[AppConsumidor.Foundation.ViewModels.AcessoViewModel, AppConsumidor.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.IoCConstruct (System.Type type) [0x00012] in C:\projects\mvvmcross\MvvmCross\Platform\Platform\IoC\MvxSimpleIoCContainer.cs:367 at MvvmCross.Platform.Mvx.IocConstruct[T] () [0x00006] in C:\projects\mvvmcross\MvvmCross\Platform\Platform\Mvx.cs:163 at MvvmCross.Platform.Mvx.ConstructAndRegisterSingleton[TInterface,TType] () [0x00006] in C:\projects\mvvmcross\MvvmCross\Platform\Platform\Mvx.cs:109 at MvvmCross.Core.ViewModels.MvxApplication.RegisterNavigationServiceAppStart[TViewModel] () [0x00000] in C:\projects\mvvmcross\MvvmCross\Core\Core\ViewModels\MvxApplication.cs:54 at AppConsumidor.Foundation.Ap p.Initialize () [0x0001c] in C:\Projetos\Android\AppConsumidor\branches\#7276\AppConsumidor\AppConsumidor.Foundation\App.cs:38 at MvvmCross.Core.Platform.MvxSetup.InitializeApp (MvvmCross.Platform.Plugins.IMvxPluginManager pluginManager, MvvmCross.Core.ViewModels.IMvxApplication app) [0x00007] in C:\projects\mvvmcross\MvvmCross\Core\Core\Platform\MvxSetup.cs:290 at AppConsumidor.iOS.Setup.InitializeApp (MvvmCross.Platform.Plugins.IMvxPluginManager pluginManager, MvvmCross.Core.ViewModels.IMvxApplication app) [0x00001] in C:\Projetos\Android\AppConsumidor\branches\#7276\AppConsumidor\AppConsumidor.iOS\Startup\Setup.cs:42 at MvvmCross.Core.Platform.MvxSetup.InitializeSecondary () [0x000b4] in C:\projects\mvvmcross\MvvmCross\Core\Core\Platform\MvxSetup.cs:90 at MvvmCross.Core.Platform.MvxSetup.Initialize () [0x00006] in C:\projects\mvvmcross\MvvmCross\Core\Core\Platform\MvxSetup.cs:41 at AppConsumidor.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launc hOptions) [0x0002c] in C:\Projetos\Android\AppConsumidor\branches\#7276\AppConsumidor\AppConsumidor.iOS\Startup\AppDelegate.cs:25 at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/UIKit/UIApplication.cs:79 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/UIKit/UIApplication.cs:63 at AppConsumidor.iOS.Application.Main (System.String[] args) [0x00097] in <28dac83763b8426ba21bc80b662c0a32>:0 2018-05-22 18:20:12.906 AppConsumidor.iOS[24622:318652] Unhandled managed exception: Failed to find constructor for type MvvmCross.Core.ViewModels.MvxNavigationServiceAppStart1[[AppConsumidor.Foundation.ViewModels.Acess
oViewModel, AppConsumidor.iOS, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]] (MvvmCross.Platform.Exceptions.MvxIoCResolveException)
at MvvmCross.Platform.IoC.MvxSimpleIoCContainer.IoCConstruct (System.Type type) [0x00012] in C:\projects\mvvmcross\MvvmCross\Platform\Platform\IoC\MvxSimpleIoCContainer.cs:367
at MvvmCross.Platform.Mvx.IocConstruct[T] () [0x00006] in C:\projects\mvvmcross\MvvmCross\Platform\Platform\Mvx.cs:163
at MvvmCross.Platform.Mvx.ConstructAndRegisterSingleton[TInterface,TType] () [0x00006] in C:\projects\mvvmcross\MvvmCross\Platform\Platform\Mvx.cs:109
at MvvmCross.Core.ViewModels.MvxApplication.RegisterNavigationServiceAppStart[TViewModel] () [0x00000] in C:\projects\mvvmcross\MvvmCross\Core\Core\ViewModels\MvxApplication.cs:54
at AppConsumidor.Foundation.App.Initialize () [0x0001c] in C:\Projetos\Android\AppConsumidor\branches#7276\AppConsumidor\AppConsumidor.Foundation\App.cs:38
at MvvmCross.Core.Platform.MvxSetup.InitializeApp (MvvmCross.Platform.Plugins.IMvx
PluginManager pluginManager, MvvmCross.Core.ViewModels.IMvxApplication app) [0x00007] in C:\projects\mvvmcross\MvvmCross\Core\Core\Platform\MvxSetup.cs:290
at AppConsumidor.iOS.Setup.InitializeApp (MvvmCross.Platform.Plugins.IMvxPluginManager pluginManager, MvvmCross.Core.ViewModels.IMvxApplication app) [0x00001] in C:\Projetos\Android\AppConsumidor\branches#7276\AppConsumidor\AppConsumidor.iOS\Startup\Setup.cs:42
at MvvmCross.Core.Platform.MvxSetup.InitializeSecondary () [0x000b4] in C:\projects\mvvmcross\MvvmCross\Core\Core\Platform\MvxSetup.cs:90
at MvvmCross.Core.Platform.MvxSetup.Initialize () [0x00006] in C:\projects\mvvmcross\MvvmCross\Core\Core\Platform\MvxSetup.cs:41
at AppConsumidor.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x0002c] in C:\Projetos\Android\AppConsumidor\branches#7276\AppConsumidor\AppConsumidor.iOS\Startup\AppDelegate.cs:25
at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string
[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0002c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/UIKit/UIApplication.cs:63
at AppConsumidor.iOS.Application.Main (System.String[] args) [0x00097] in <28dac83763b8426ba21bc80b662c0a32>:0

Posts

This discussion has been closed.