0
votes

I'm installed version 3.5.1 of the Mvvmcross color plugin to my Core and iOS projects. When I start the app, the app crashes with error:

Cirrious.CrossCore.Exceptions.MvxException: Default constructor not found for type Cirrious.MvvmCross.Plugins.Color.Touch.Plugin ---> System.MissingMethodException: Default constructor not found for type Cirrious.MvvmCross.Plugins.Color.Touch.Plugin at System.RuntimeType.CreateInstanceMono (Boolean nonPublic) [0x00085] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:105 at System.RuntimeType.CreateInstanceSlow (Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0001a] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:87 at System.RuntimeType.CreateInstanceDefaultCtor (Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0002a] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/rttype.cs:5734 at System.Activator.CreateInstance[T] () <0x1002ecbe0 + 0x0008f> in :0 at Cirrious.CrossCore.Plugins.MvxLoaderPluginBootstrapAction2[TPlugin,TPlatformPlugin].<PreLoad>b__0 () [0x00000] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxLoaderPluginManager.FindPlugin (System.Type toLoad) [0x0004d] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin (System.Type toLoad) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin (System.Type toLoad) [0x00040] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePlatformAdaptionLoaded[T] () [0x00021] in <filename unknown>:0 at Cirrious.MvvmCross.Plugins.Color.PluginLoader.EnsureLoaded () [0x00006] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded (IMvxPluginLoader pluginLoader) [0x0005e] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded (System.Type type) [0x0007f] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded[TType] () [0x00000] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginBootstrapAction1[TPlugin].Load (IMvxPluginManager manager) [0x00000] in :0 at Cirrious.CrossCore.Plugins.MvxLoaderPluginBootstrapAction2[TPlugin,TPlatformPlugin].Load (IMvxPluginManager manager) [0x00007] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginBootstrapAction1[TPlugin].RunAction () [0x00006] in :0 at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.InternalSetResolver (System.Type tInterface, IResolver resolver) [0x0005c] in :0 at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton (System.Type tInterface, System.Object theObject) [0x00008] in :0 at Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton[TInterface] (Cirrious.CrossCore.IoC.TInterface theObject) [0x00000] in :0 at Cirrious.CrossCore.Mvx.RegisterSingleton[TInterface] (Cirrious.CrossCore.TInterface service) [0x00006] in :0 at Cirrious.MvvmCross.Platform.MvxSetup.InitializePluginFramework () [0x0001a] in :0 at Cirrious.MvvmCross.Platform.MvxSetup.InitializeSecondary () [0x00068] in :0 at Cirrious.MvvmCross.Platform.MvxSetup.Initialize () [0x00006] in :0 at Orderpad.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x00024] in /Users/edward.price/Development/source/client/Orderpad.Android/Orderpad.iOS/AppDelegate.cs:32 at at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:77 at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0001c] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:60 at Orderpad.iOS.Application.Main (System.String[] args) [0x00008] in /Users/edward.price/Development/source/client/Orderpad.Android/Orderpad.iOS/Main.cs:12

It fails in setup.Initialize();

    public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
    {
        _window = new UIWindow(UIScreen.MainScreen.Bounds);

        var setup = new Setup(this, _window);
        setup.Initialize();

        ApplyTheme();

        var startup = Mvx.Resolve<IMvxAppStart>();
        startup.Start();

        _window.MakeKeyAndVisible();

        return true;
    }

The last Mvx debug trace is:

Ensuring Plugin is loaded for Cirrious.MvvmCross.Plugins.Color.PluginLoader

Any ideas what is going wrong?

1

1 Answers

1
votes

Solved by adding:

<assembly fullname="Cirrious.MvvmCross.Plugins.Color.Touch">
      <type fullname="*" />
</assembly>

to Linker.xml